623 {
625
626 bool remove = true;
627 std::list<WorldObject*>::const_iterator itr, itr2, itrEnd = targets.end();
628 for (itr = targets.begin(); itr != itrEnd && remove; ++itr)
629 {
630 if (
GetCaster()->GetExactDist2d(*itr) > 5.0f)
631 remove = false;
632
633 for (itr2 = targets.begin(); itr2 != itrEnd && remove; ++itr2)
634 if (itr != itr2 && (*itr2)->GetExactDist2d(*itr) > 5.0f)
635 remove = false;
636 }
637
638 if (remove)
640 {
641 targets.clear();
643 }
644 }
@ SPELL_PACT_OF_THE_DARKFALLEN
Definition: boss_blood_queen_lana_thel.cpp:63
Definition: GridNotifiers.h:1627
Definition: InstanceScript.h:142
Unit * GetCaster()
Definition: SpellScript.cpp:401