diff options
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index ef82c5022fe..296090a4378 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -597,6 +597,9 @@ void SmartAI::EnterCombat(Unit* enemy) me->InterruptNonMeleeSpells(false); // must be before ProcessEvents GetScript()->ProcessEventsFor(SMART_EVENT_AGGRO, enemy); me->GetPosition(&mLastOOCPos); + SetRun(mRun); + if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == POINT_MOTION_TYPE) + me->GetMotionMaster()->MovementExpired(); } void SmartAI::JustDied(Unit* killer) @@ -620,14 +623,8 @@ void SmartAI::AttackStart(Unit* who) { if (who && me->Attack(who, me->IsWithinMeleeRange(who))) { - SetRun(mRun); - if (me->GetMotionMaster()->GetMotionSlotType(MOTION_SLOT_ACTIVE) == POINT_MOTION_TYPE) - me->GetMotionMaster()->MovementExpired(); - if (mCanCombatMove) me->GetMotionMaster()->MoveChase(who); - - me->GetPosition(&mLastOOCPos); } } |
