639 {
641
642 bool remove = true;
643 std::list<WorldObject*>::const_iterator itr, itr2, itrEnd = targets.end();
644 for (itr = targets.begin(); itr != itrEnd && remove; ++itr)
645 {
646 if (
GetCaster()->GetExactDist2d(*itr) > 5.0f)
647 remove = false;
648
649 for (itr2 = targets.begin(); itr2 != itrEnd && remove; ++itr2)
650 if (itr != itr2 && (*itr2)->GetExactDist2d(*itr) > 5.0f)
651 remove = false;
652 }
653
654 if (remove)
656 {
657 targets.clear();
659 }
660 }
@ SPELL_PACT_OF_THE_DARKFALLEN
Definition: boss_blood_queen_lana_thel.cpp:63
Definition: GridNotifiers.h:1623
Definition: InstanceScript.h:141
Unit * GetCaster()
Definition: SpellScript.cpp:401