From cd248ef66544412237ce30de1f65e931507592e0 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sun, 28 May 2023 10:52:46 -0300 Subject: [PATCH] fix(Scripts/ShatteredHalls): Fix Nethekurse delay after peon dies (#16384) * fix(Scripts/ShatteredHalls): Fix Nethekurse delay after peon dies * Update boss_nethekurse.cpp * typo * Update boss_nethekurse.cpp * Update boss_nethekurse.cpp --- .../ShatteredHalls/boss_nethekurse.cpp | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 52136278e..cb88ed326 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -113,6 +113,11 @@ struct boss_grand_warlock_nethekurse : public BossAI instance->SetBossState(DATA_NETHEKURSE, NOT_STARTED); } + void JustReachedHome() override + { + me->GetMotionMaster()->Initialize(); + } + void JustDied(Unit* /*killer*/) override { Talk(SAY_DIE); @@ -137,9 +142,13 @@ struct boss_grand_warlock_nethekurse : public BossAI scheduler.Schedule(500ms, GROUP_RP, [this](TaskContext /*context*/) { me->HandleEmoteCommand(EMOTE_ONESHOT_APPLAUD); - me->GetMotionMaster()->Initialize(); Talk(SAY_PEON_DIES); + scheduler.Schedule(1s, GROUP_RP, [this](TaskContext /*context*/) + { + me->GetMotionMaster()->Initialize(); + }); + if (++PeonKilledCount == 4) { Talk(SAY_INTRO_2); @@ -161,16 +170,14 @@ struct boss_grand_warlock_nethekurse : public BossAI me->GetMotionMaster()->MoveIdle(); me->SetFacingTo(4.572762489318847656f); - scheduler.Schedule(500ms, GROUP_RP, [this](TaskContext /*context*/) + scheduler.Schedule(2500ms, GROUP_RP, [this](TaskContext /*context*/) { - scheduler.Schedule(2500ms, GROUP_RP, [this](TaskContext /*context*/) - { - PeonRoleplay roleplayData = Acore::Containers::SelectRandomContainerElement(PeonRoleplayData); - DoCast(me, roleplayData.spellId); - Talk(roleplayData.textId); - me->GetMotionMaster()->Initialize(); - }); + PeonRoleplay roleplayData = Acore::Containers::SelectRandomContainerElement(PeonRoleplayData); + DoCast(me, roleplayData.spellId); + Talk(roleplayData.textId); + me->GetMotionMaster()->Initialize(); }); + context.Repeat(16400ms, 28500ms); }); }