333 {
336 {
338 std::list<Player*> players;
342
343 if (players.size() > 0)
344 {
345 std::list<Player*>::iterator itr = players.begin();
346 std::advance(itr,
urand(0, players.size() - 1));
347 if (
Creature* trigger =
me->
SummonTrigger((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), 0, 2000,
true))
349 }
350 }
351 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ SPELL_FLAMES
Definition: go_scripts.cpp:318
GameObject *const me
Definition: GameObjectAI.h:36
Definition: Creature.h:46
Creature * SummonTrigger(float x, float y, float z, float ang, uint32 dur, bool setLevel=false, CreatureAI *(*GetAI)(Creature *)=nullptr)
Definition: Object.cpp:2392
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:193
Definition: GridNotifiers.h:522
Definition: GridNotifiers.h:1384