aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/MotionMaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 56934f67c7c..32d0661020c 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -929,13 +929,14 @@ void MotionMaster::MoveFall(uint32 id/* = 0*/)
void MotionMaster::MoveSeekAssistance(float x, float y, float z)
{
- if (_owner->GetTypeId() == TYPEID_UNIT)
+ if (Creature* creature = _owner->ToCreature())
{
- TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveSeekAssistance: '%s', seeks assistance (X: %f, Y: %f, Z: %f)", _owner->GetGUID().ToString().c_str(), x, y, z);
- _owner->AttackStop();
- _owner->CastStop();
- _owner->ToCreature()->SetReactState(REACT_PASSIVE);
- Add(new AssistanceMovementGenerator(EVENT_ASSIST_MOVE, x, y, z, _owner->GetSpeed(MOVE_RUN) * 0.66f));
+ TC_LOG_DEBUG("movement.motionmaster", "MotionMaster::MoveSeekAssistance: '%s', seeks assistance (X: %f, Y: %f, Z: %f)", creature->GetGUID().ToString().c_str(), x, y, z);
+ creature->AttackStop();
+ creature->CastStop();
+ creature->DoNotReacquireSpellFocusTarget();
+ creature->SetReactState(REACT_PASSIVE);
+ Add(new AssistanceMovementGenerator(EVENT_ASSIST_MOVE, x, y, z));
}
else
TC_LOG_ERROR("movement.motionmaster", "MotionMaster::MoveSeekAssistance: '%s', attempted to seek assistance.", _owner->GetGUID().ToString().c_str());