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) --- .../EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp | 8 ++++---- .../ScarletMonastery/boss_mograine_and_whitemane.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/server/scripts/EasternKingdoms/ScarletMonastery') diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 50687a89ac9..f3812ae24b2 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -322,7 +322,7 @@ public: DoCast(me, SPELL_HEAD_LANDS, true); DoCast(me, SPELL_HEAD, false); SaySound(SAY_LOST_HEAD); - me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveFleeing(caster->GetVictim()); } } @@ -337,7 +337,7 @@ public: wait = 1000; if (!me->GetVictim()) return; - me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveFleeing(me->GetVictim()); } else wait -= diff; @@ -602,7 +602,7 @@ public: me->SetFullHealth(); SaySound(SAY_REJOINED); DoCast(me, SPELL_HEAD); - caster->GetMotionMaster()->Clear(false); + caster->GetMotionMaster()->Clear(); caster->GetMotionMaster()->MoveFollow(me, 6, float(urand(0, 5))); } } @@ -677,7 +677,7 @@ public: if (wp_reached) { wp_reached = false; - me->GetMotionMaster()->Clear(false); + me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MovePoint(id, FlightPoint[id]); } } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index 935b5b21515..684a98927ee 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -128,19 +128,19 @@ public: Talk(SAY_MO_KILL); } - void DamageTaken(Unit* /*doneBy*/, uint32 &damage) override + void DamageTaken(Unit* /*doneBy*/, uint32& damage) override { - if (damage < me->GetHealth() || _bHasDied || _bFakeDeath) + if (damage <= me->GetHealth() || _bHasDied || _bFakeDeath) return; - //On first death, fake death and open door, as well as initiate whitemane if exist + // On first death, fake death and open door, as well as initiate whitemane if exist if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE))) { instance->SetBossState(DATA_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); Whitemane->GetMotionMaster()->MovePoint(1, 1163.113370f, 1398.856812f, 32.527786f); - me->GetMotionMaster()->MovementExpired(); + me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); me->SetHealth(0); -- cgit v1.2.3