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
committerGitHub <noreply@github.com>2018-06-03 10:06:57 -0700
commit982643cd96790ffc54e7a3e507469649f3b074d2 (patch)
tree90e65482d064fc9b2e8d0e215f2dec6e5fe663c9 /src/server/scripts/EasternKingdoms
parentb84348f6fc7746349fdcbd443b32fe5483174442 (diff)
Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-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
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index ffaff3ba47c..81a547ea16f 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1022,7 +1022,7 @@ void PretendToDie(Creature* creature)
creature->RemoveAllAuras();
creature->SetHealth(0);
creature->SetFlag(UNIT_FIELD_FLAGS, 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 edbfe09a76d..f4facc19d0e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -385,7 +385,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 1f70792779c..023782021ae 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 780dd473288..ebbc56e3bee 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -324,7 +324,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());
}
}
@@ -339,7 +339,7 @@ public:
wait = 1000;
if (!me->GetVictim())
return;
- me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveFleeing(me->GetVictim());
}
else wait -= diff;
@@ -604,7 +604,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)));
}
}
@@ -679,7 +679,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 11bc1401431..d1bfe7c220d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -129,19 +129,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 7a2e7cf09ca..135bb109f51 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);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
index 3c225099ca6..039ad2525cf 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp
@@ -311,7 +311,7 @@ class boss_nalorakk : public CreatureScript
{
if (waitTimer <= diff)
{
- me->GetMotionMaster()->MovementExpired();
+ me->GetMotionMaster()->Clear(MOTION_PRIORITY_NORMAL);
me->GetMotionMaster()->MovePoint(MovePhase, NalorakkWay[MovePhase][0], NalorakkWay[MovePhase][1], NalorakkWay[MovePhase][2]);
waitTimer = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
index a4ccef587d9..54cac735a1e 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp
@@ -377,7 +377,7 @@ class npc_zulian_prowler : public CreatureScript
void JustEngagedWith(Unit* /*who*/) override
{
- me->GetMotionMaster()->Clear(false);
+ me->GetMotionMaster()->Clear();
me->RemoveAura(SPELL_SNEAK_RANK_1_1);
me->RemoveAura(SPELL_SNEAK_RANK_1_2);
}