882 {
884 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
886 {
888 creature->GetMotionMaster()->GetCurrentMovementGeneratorType() !=
POINT_MOTION_TYPE)
889 {
890 target = creature;
891 break;
892 }
893 }
894
895 targets.clear();
896 if (target)
897 targets.push_back(target);
898 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
Definition: Creature.h:46
Creature * ToCreature()
Definition: Object.h:197
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:4039
Unit * GetCaster()
Definition: SpellScript.cpp:401