fix(Core/Magtheridon): Fix Manticron Cube mechanic (#16745)

This commit is contained in:
Angelo Venturini
2023-07-12 14:17:34 -03:00
committed by GitHub
parent 9b5933ac5f
commit a8964a6ed1

View File

@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "TaskScheduler.h"
#include "magtheridons_lair.h"
enum Yells
@@ -93,6 +94,7 @@ struct boss_magtheridon : public BossAI
BossAI::Reset();
_currentPhase = 0;
_recentlySpoken = false;
_interruptScheduler.CancelAll();
scheduler.Schedule(90s, [this](TaskContext context)
{
Talk(SAY_TAUNT);
@@ -186,7 +188,7 @@ struct boss_magtheridon : public BossAI
{
DoCastSelf(SPELL_BLAST_NOVA);
scheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context)
_interruptScheduler.Schedule(50ms, GROUP_INTERRUPT_CHECK, [this](TaskContext context)
{
if (me->GetAuraCount(SPELL_SHADOW_GRASP_VISUAL) == 5)
{
@@ -197,7 +199,7 @@ struct boss_magtheridon : public BossAI
context.Repeat(50ms);
}).Schedule(12s, GROUP_INTERRUPT_CHECK, [this](TaskContext /*context*/)
{
scheduler.CancelGroup(GROUP_INTERRUPT_CHECK);
_interruptScheduler.CancelGroup(GROUP_INTERRUPT_CHECK);
});
});
context.Repeat(53s, 56s);
@@ -214,6 +216,7 @@ struct boss_magtheridon : public BossAI
return;
scheduler.Update(diff);
_interruptScheduler.Update(diff);
if (_currentPhase != 1)
{
@@ -224,6 +227,7 @@ struct boss_magtheridon : public BossAI
private:
bool _recentlySpoken;
uint8 _currentPhase;
TaskScheduler _interruptScheduler;
};
class spell_magtheridon_blaze : public SpellScript