Skip to content

Commit

Permalink
fix(Scripts/TheEye): maybe fix Al'ar transition (azerothcore#18552)
Browse files Browse the repository at this point in the history
initial
  • Loading branch information
elthehablo authored Mar 13, 2024
1 parent 0da6b17 commit 28ea5ca
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ struct boss_alar : public BossAI
_canAttackCooldown = true;
_baseAttackOverride = false;
_spawnPhoenixes = false;
_transitionScheduler.CancelAll();
_platform = 0;
_noMelee = false;
_platformRoll = 0;
Expand Down Expand Up @@ -183,28 +184,28 @@ 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;
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
_platform = POINT_MIDDLE;
me->GetMotionMaster()->MoveChase(me->GetVictim());
ScheduleAbilities();
}, EVENT_REBIRTH);
});
}
}

Expand Down Expand Up @@ -356,6 +357,8 @@ struct boss_alar : public BossAI

void UpdateAI(uint32 diff) override
{
_transitionScheduler.Update(diff);

if (!UpdateVictim())
{
return;
Expand Down Expand Up @@ -413,6 +416,7 @@ struct boss_alar : public BossAI
uint8 _platformRoll;
uint8 _noQuillTimes;
std::chrono::seconds _platformMoveRepeatTimer;
TaskScheduler _transitionScheduler;
};

class CastQuill : public BasicEvent
Expand Down

0 comments on commit 28ea5ca

Please sign in to comment.