From 29af6cc88662ab2565bdcedcf60e12f0cc87cecf Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:48:40 +0200 Subject: [PATCH] fix(Scripts/Magtheridon): make the timers of Quake and Blast Nova independent from each other (#17364) * initial * fix timers * add delay for duration * Update boss_magtheridon.cpp 10s --- .../MagtheridonsLair/boss_magtheridon.cpp | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index c9602b38b..baee42732 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -166,7 +166,7 @@ struct boss_magtheridon : public BossAI { me->CastCustomSpell(SPELL_BLAZE, SPELLVALUE_MAX_TARGETS, 1); context.Repeat(11s, 39s); - }).Schedule(40s, [this](TaskContext context) + }).Schedule(28300ms, [this](TaskContext context) { DoCastSelf(SPELL_QUAKE); _castingQuake = true; @@ -175,29 +175,33 @@ struct boss_magtheridon : public BossAI me->SetOrientation(me->GetAngle(me->GetVictim())); me->SetTarget(ObjectGuid::Empty); scheduler.DelayAll(6999ms); - scheduler.Schedule(7s, [this](TaskContext /*context*/) + scheduler.Schedule(7s, [this](TaskContext) { _castingQuake = false; me->SetReactState(REACT_AGGRESSIVE); me->GetMotionMaster()->MoveChase(me->GetVictim()); - DoCastSelf(SPELL_BLAST_NOVA); - - _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) - { - if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) - { - Talk(SAY_BANISH); - me->InterruptNonMeleeSpells(true); - scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - } - else - context.Repeat(50ms); - }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) - { - _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); - }); }); - context.Repeat(53s, 56s); + context.Repeat(56300ms, 64300ms); + }).Schedule(55650ms, [this](TaskContext context) + { + DoCastSelf(SPELL_BLAST_NOVA); + scheduler.DelayAll(10s); + + _interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context) + { + if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5) + { + Talk(SAY_BANISH); + me->InterruptNonMeleeSpells(true); + scheduler.CancelGroup(GROUP_INTERRUPT_CHECK); + } + else + context.Repeat(50ms); + }).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/) + { + _interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK); + }); + context.Repeat(54350ms, 55400ms); }).Schedule(22min, [this](TaskContext /*context*/) { DoCastSelf(SPELL_BERSERK, true);