Skip to content

Commit

Permalink
fix(Core/Magtheridon): Fix Manticron Cube mechanic (azerothcore#16745)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nefertumm committed Jul 12, 2023
1 parent 9b5933a commit a8964a6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#include "TaskScheduler.h"
#include "magtheridons_lair.h"

enum Yells
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
Expand All @@ -214,6 +216,7 @@ struct boss_magtheridon : public BossAI
return;

scheduler.Update(diff);
_interruptScheduler.Update(diff);

if (_currentPhase != 1)
{
Expand All @@ -224,6 +227,7 @@ struct boss_magtheridon : public BossAI
private:
bool _recentlySpoken;
uint8 _currentPhase;
TaskScheduler _interruptScheduler;
};

class spell_magtheridon_blaze : public SpellScript
Expand Down

0 comments on commit a8964a6

Please sign in to comment.