2331 {
2333 Player* target =
nullptr;
2338 {
2339 if (itr->GetSource() ==
GetUnitOwner() ||
GetUnitOwner()->GetDistance(itr->GetSource()) > 50.0f || !itr->GetSource()->
IsAlive() || itr->GetSource()->IsGameMaster())
2340 continue;
2341
2342 if (_counter <= _offset || !target)
2343 target = itr->GetSource();
2344 else
2345 break;
2346 }
2347
2348 if (!target)
2350 else
2352 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::uint8_t uint8
Definition: Define.h:109
uint32 getSize() const
Definition: LinkedList.h:115
Definition: LinkedList.h:139
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
Map * GetMap() const
Definition: Object.h:536
Definition: Player.h:1081
bool IsAlive() const
Definition: Unit.h:1654
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void PreventDefaultAction()
Definition: SpellScript.cpp:985
void SetDuration(int32 duration, bool withMods=false)
Definition: SpellScript.cpp:1060
Unit * GetUnitOwner() const
Definition: SpellScript.cpp:1030
ObjectGuid _targetGUID
Definition: boss_yoggsaron.cpp:2386