diff options
| author | ccrs <ccrs@users.noreply.github.com> | 2018-06-03 10:06:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-03 10:06:57 -0700 |
| commit | 982643cd96790ffc54e7a3e507469649f3b074d2 (patch) | |
| tree | 90e65482d064fc9b2e8d0e215f2dec6e5fe663c9 /src/server/game/AI/ScriptedAI | |
| parent | b84348f6fc7746349fdcbd443b32fe5483174442 (diff) | |
Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 1a61a9dc6a9..091d7a42e47 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -207,7 +207,7 @@ void EscortAI::UpdateAI(uint32 diff) else if (_resume) { _resume = false; - if (MovementGenerator* movementGenerator = me->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_IDLE)) + if (MovementGenerator* movementGenerator = me->GetMotionMaster()->GetCurrentMovementGenerator(MOTION_SLOT_DEFAULT)) movementGenerator->Resume(0); } } @@ -331,7 +331,7 @@ void EscortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, TC_LOG_DEBUG("scripts", "EscortAI::Start: (script: %s, creature entry: %u) is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn.", me->GetScriptName().c_str(), me->GetEntry()); me->GetMotionMaster()->MoveIdle(); - me->GetMotionMaster()->Clear(MOTION_SLOT_ACTIVE); + me->GetMotionMaster()->Clear(MOTION_PRIORITY_NORMAL); // disable npcflags me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); @@ -368,7 +368,7 @@ void EscortAI::SetEscortPaused(bool on) if (on) { AddEscortState(STATE_ESCORT_PAUSED); - if (MovementGenerator* movementGenerator = me->GetMotionMaster()->GetMotionSlot(MOTION_SLOT_IDLE)) + if (MovementGenerator* movementGenerator = me->GetMotionMaster()->GetCurrentMovementGenerator(MOTION_SLOT_DEFAULT)) movementGenerator->Pause(0); } else |
