fix(Scripts/TheEye): maybe fix Al'ar transition (#18552)

initial
This commit is contained in:
Dan
2024-03-13 20:53:17 +01:00
committed by GitHub
parent 0da6b17f7b
commit 28ea5ca879

View File

@@ -115,6 +115,7 @@ struct boss_alar : public BossAI
_canAttackCooldown = true;
_baseAttackOverride = false;
_spawnPhoenixes = false;
_transitionScheduler.CancelAll();
_platform = 0;
_noMelee = false;
_platformRoll = 0;
@@ -183,20 +184,20 @@ struct boss_alar : public BossAI
damage = 0;
DoCastSelf(SPELL_EMBER_BLAST, true);
PretendToDie(me);
ScheduleUniqueTimedEvent(1s, [&]{
_transitionScheduler.Schedule(1s, [this](TaskContext)
{
me->SetVisible(false);
}, EVENT_INVISIBLE);
ScheduleUniqueTimedEvent(8s, [&]{
}).Schedule(8s, [this](TaskContext)
{
me->SetPosition(alarPoints[POINT_MIDDLE]);
}, EVENT_RELOCATE_MIDDLE);
ScheduleUniqueTimedEvent(12s, [&]
}).Schedule(12s, [this](TaskContext)
{
me->SetStandState(UNIT_STAND_STATE_STAND);
me->SetVisible(true);
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
DoCastSelf(SPELL_REBIRTH_PHASE2);
}, EVENT_MOVE_TO_PHASE_2);
ScheduleUniqueTimedEvent(16001ms, [&]{
}).Schedule(16001ms, [this](TaskContext)
{
me->SetHealth(me->GetMaxHealth());
me->SetReactState(REACT_AGGRESSIVE);
_noMelee = false;
@@ -204,7 +205,7 @@ struct boss_alar : public BossAI
_platform = POINT_MIDDLE;
me->GetMotionMaster()->MoveChase(me->GetVictim());
ScheduleAbilities();
}, EVENT_REBIRTH);
});
}
}
@@ -356,6 +357,8 @@ struct boss_alar : public BossAI
void UpdateAI(uint32 diff) override
{
_transitionScheduler.Update(diff);
if (!UpdateVictim())
{
return;
@@ -413,6 +416,7 @@ private:
uint8 _platformRoll;
uint8 _noQuillTimes;
std::chrono::seconds _platformMoveRepeatTimer;
TaskScheduler _transitionScheduler;
};
class CastQuill : public BasicEvent