910 {
912 for (std::list<WorldObject*>::const_iterator itr = targets.begin(); itr != targets.end(); ++itr)
914 {
916 creature->GetMotionMaster()->GetCurrentMovementGeneratorType() !=
POINT_MOTION_TYPE)
917 {
918 target = creature;
919 break;
920 }
921 }
922
923 targets.clear();
924 if (target)
925 targets.push_back(target);
926 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:48
Definition: Creature.h:43
Creature * ToCreature()
Definition: Object.h:205
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:4099
Unit * GetCaster()
Definition: SpellScript.cpp:401