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
This commit is contained in:
Dan
2023-09-28 10:48:40 +02:00
committed by GitHub
parent 52c7edaa5c
commit 29af6cc886

View File

@@ -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);