1079 {
1082 {
1083 if (owner->isMoving())
1084 {
1086 }
1087 else
1088 {
1092 }
1093 }
1094 }
#define PET_FOLLOW_DIST
Definition: PetDefines.h:198
@ MOTION_SLOT_ACTIVE
Definition: MotionMaster.h:64
MotionMaster * GetMotionMaster()
Definition: Unit.h:1620
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE, bool inheritWalkState=true)
The unit will follow this target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:409
void Clear(bool reset=true)
Definition: MotionMaster.h:167
void MoveRandom(float wanderDistance=0.0f)
Enable a random movement in desired range around the unit. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:242
void PreventDefaultAction()
Definition: SpellScript.cpp:985
WorldObject * GetOwner() const
Definition: SpellScript.cpp:1025
Unit * GetTarget() const
Definition: SpellScript.cpp:1165
uint32 GetId() const
Definition: SpellScript.cpp:1010