aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyeriah <sarah.trysan@live.com>2017-07-08 12:37:03 -0300
committerShauren <shauren.trinity@gmail.com>2020-08-18 18:53:13 +0200
commit5b8d3ede7d09d239c2e413d913230251bb3df8a0 (patch)
tree2935462ae67a47d9d38473e56725286ebf7be32b
parent7e41ddd2f3b079b9136cc5d791e77b9efa440819 (diff)
Scripts/Karazhan: Fix Attumen and Midnight not moving towards each other on phase transition after latest changes
(cherry picked from commit 746fce30d9a56ed59b53f1e1a93c9c8c3417e16b)
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index dcead9c2ecb..b89078fb228 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -237,30 +237,31 @@ public:
midnight->AttackStop();
midnight->RemoveAllAttackers();
midnight->SetReactState(REACT_PASSIVE);
- midnight->GetMotionMaster()->MoveChase(me);
+ midnight->GetMotionMaster()->MoveFollow(me, 2.0f, 0.0f);
midnight->AI()->Talk(EMOTE_MOUNT_UP);
me->AttackStop();
me->RemoveAllAttackers();
me->SetReactState(REACT_PASSIVE);
- me->GetMotionMaster()->MoveChase(midnight);
+ me->GetMotionMaster()->MoveFollow(midnight, 2.0f, 0.0f);
Talk(SAY_MOUNT);
- scheduler.Schedule(Seconds(3), [this](TaskContext task)
+ scheduler.Schedule(Seconds(1), [this](TaskContext task)
{
if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID))
{
- if (me->IsWithinMeleeRange(midnight))
+ if (me->IsWithinDist2d(midnight, 5.0f))
{
DoCastAOE(SPELL_SUMMON_ATTUMEN_MOUNTED);
me->SetVisible(false);
+ me->GetMotionMaster()->Clear();
midnight->SetVisible(false);
}
else
{
- midnight->GetMotionMaster()->MoveChase(me);
- me->GetMotionMaster()->MoveChase(midnight);
- task.Repeat(Seconds(3));
+ midnight->GetMotionMaster()->MoveFollow(me, 2.0f, 0.0f);
+ me->GetMotionMaster()->MoveFollow(midnight, 2.0f, 0.0f);
+ task.Repeat();
}
}
});