aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2018-06-03 10:06:57 -0700
committerShauren <shauren.trinity@gmail.com>2021-09-28 00:15:13 +0200
commit426f9f2f92b26fbb68e7cda9290ccbd586c6af4e (patch)
treeede70b7865c2edb58964c7aa668eb1250a5816ab /src/server/scripts/EasternKingdoms
parent3e0af19b7767d6e71a7467874fdad566cea5ee87 (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/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp2
7 files changed, 13 insertions, 13 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index 73b2583c5da..0a21c2da912 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -538,7 +538,7 @@ public:
Talk(SAY_ATIESH);
me->SetFacingTo(me->GetAbsoluteAngle(player));
me->ClearUnitState(UNIT_STATE_MOVING);
- me->GetMotionMaster()->MoveDistract(7 * IN_MILLISECONDS);
+ me->GetMotionMaster()->MoveDistract(7 * IN_MILLISECONDS, me->GetAbsoluteAngle(who));
break;
}
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 04e7e60d7c5..6f8157e3306 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1021,7 +1021,7 @@ void PretendToDie(Creature* creature)
creature->RemoveAllAuras();
creature->SetHealth(0);
creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- creature->GetMotionMaster()->MovementExpired(false);
+ creature->GetMotionMaster()->Clear();
creature->GetMotionMaster()->MoveIdle();
creature->SetStandState(UNIT_STAND_STATE_DEAD);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 5314fa4388b..d94bf9c3ce5 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -391,7 +391,7 @@ class npc_eye_of_acherus : public CreatureScript
Movement::MoveSplineInit init(me);
init.MoveTo(EyeOFAcherusFallPoint.GetPositionX(), EyeOFAcherusFallPoint.GetPositionY(), EyeOFAcherusFallPoint.GetPositionZ(), false);
init.SetFall();
- me->GetMotionMaster()->LaunchMoveSpline(std::move(init), POINT_EYE_FALL, MOTION_SLOT_ACTIVE, POINT_MOTION_TYPE);
+ me->GetMotionMaster()->LaunchMoveSpline(std::move(init), POINT_EYE_FALL, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
}
void OnCharmed(bool /*apply*/) override { }
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
index eebd0736f39..a92a344c6fb 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp
@@ -78,7 +78,7 @@ public:
z += 4.0f;
x -= 3.5f;
y -= 5.0f;
- me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->Clear();
me->UpdatePosition(x, y, z, 0.0f);
}
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);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index 37040fde6d7..fd73ccfbb46 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -277,7 +277,7 @@ public:
{
case 0:
//me->AttackStop();
- me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->Clear();
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->StopMoving();
Talk(YELL_TAKEOFF);