diff options
| author | ccrs <ccrs@users.noreply.github.com> | 2018-06-03 10:06:57 -0700 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-09-28 00:15:13 +0200 |
| commit | 426f9f2f92b26fbb68e7cda9290ccbd586c6af4e (patch) | |
| tree | ede70b7865c2edb58964c7aa668eb1250a5816ab /src/server/scripts/Outland | |
| parent | 3e0af19b7767d6e71a7467874fdad566cea5ee87 (diff) | |
Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
(cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2)
Diffstat (limited to 'src/server/scripts/Outland')
4 files changed, 7 insertions, 9 deletions
diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp index 4807a0fbcb5..bd0ff4a4ad2 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp @@ -151,8 +151,7 @@ class boss_nexusprince_shaffar : public CreatureScript // expire movement, will prevent from running right back to victim after cast // (but should MoveChase be used again at a certain time or should he not move?) - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) - me->GetMotionMaster()->MovementExpired(); + me->GetMotionMaster()->Clear(MOTION_PRIORITY_NORMAL); DoCast(me, SPELL_BLINK); break; diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 36d04389514..76d31bd203e 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -724,7 +724,7 @@ struct npc_ashtongue_sorcerer : public ScriptedAI { _inBanish = true; me->StopMoving(); - me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MovePoint(1, me->GetPositionX() + frand(-8.0f, 8.0f), me->GetPositionY() + frand(-8.0f, 8.0f), me->GetPositionZ()); _scheduler.Schedule(Seconds(1) + Milliseconds(500), [this](TaskContext sorcer_channel) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 1a84c014d0f..1034a1f8039 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -248,7 +248,7 @@ public: { Talk(EMOTE_SPOUT); me->SetReactState(REACT_PASSIVE); - me->GetMotionMaster()->MoveRotate(20000, urand(0, 1) ? ROTATE_DIRECTION_LEFT : ROTATE_DIRECTION_RIGHT); + me->GetMotionMaster()->MoveRotate(0, 20000, urand(0, 1) ? ROTATE_DIRECTION_LEFT : ROTATE_DIRECTION_RIGHT); SpoutTimer = 45000; WhirlTimer = 20000; // whirl directly after spout RotTimer = 20000; @@ -266,7 +266,7 @@ public: else WhirlTimer -= diff; - if (CheckTimer <= diff)//check if there are players in melee range + if (CheckTimer <= diff) // check if there are players in melee range { InRange = false; Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers(); diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index 8bacf1d283d..7d9a3956fd4 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -287,9 +287,6 @@ public: { if (GameObject* go = unit->FindNearestGameObject(GO_CARCASS, 10)) { - if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - me->GetMotionMaster()->MovementExpired(); - me->GetMotionMaster()->MoveIdle(); me->StopMoving(); @@ -328,7 +325,9 @@ public: { DoCastVictim(SPELL_NETHER_BREATH); CastTimer = 5000; - } else CastTimer -= diff; + } + else + CastTimer -= diff; DoMeleeAttackIfReady(); } |
