From 426f9f2f92b26fbb68e7cda9290ccbd586c6af4e Mon Sep 17 00:00:00 2001 From: ccrs Date: Sun, 3 Jun 2018 10:06:57 -0700 Subject: Core/Movement: MotionMaster reimplementation (#21888) Internal structure and handling changes, nothing behavioural (or thats the intention at least). (cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2) --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index bb118886b79..fd9c7421c0f 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -204,7 +204,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); } } @@ -328,7 +328,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->SetNpcFlags(UNIT_NPC_FLAG_NONE); @@ -366,7 +366,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 -- cgit v1.2.3