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