mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
feat(Core/Scripts): Allow scheduling multiple hp checks at once for i… (#15897)
feat(Core/Scripts): Allow scheduling multiple hp checks at once for identical phases
This commit is contained in:
@@ -56,16 +56,19 @@ struct boss_talon_king_ikiss : public BossAI
|
||||
_Reset();
|
||||
_spoken = false;
|
||||
|
||||
ScheduleHealthCheckEvent(80, [&] {
|
||||
TeleportAndCastExplosion();
|
||||
});
|
||||
ScheduleHealthCheckEvent({ 80, 50, 25 }, [&] {
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCastAOE(SPELL_BLINK);
|
||||
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
||||
Talk(EMOTE_ARCANE_EXP);
|
||||
|
||||
ScheduleHealthCheckEvent(50, [&] {
|
||||
TeleportAndCastExplosion();
|
||||
});
|
||||
|
||||
ScheduleHealthCheckEvent(25, [&] {
|
||||
TeleportAndCastExplosion();
|
||||
scheduler.Schedule(1s, [this](TaskContext)
|
||||
{
|
||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
});
|
||||
});
|
||||
|
||||
ScheduleHealthCheckEvent(20, [&] {
|
||||
@@ -79,22 +82,6 @@ struct boss_talon_king_ikiss : public BossAI
|
||||
return _spoken;
|
||||
}
|
||||
|
||||
void TeleportAndCastExplosion()
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCastAOE(SPELL_BLINK);
|
||||
DoCastSelf(SPELL_ARCANE_BUBBLE, true);
|
||||
Talk(EMOTE_ARCANE_EXP);
|
||||
|
||||
scheduler.Schedule(1s, [this](TaskContext)
|
||||
{
|
||||
DoCastAOE(SPELL_ARCANE_EXPLOSION);
|
||||
}).Schedule(6500ms, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
});
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!_spoken && who->IsPlayer())
|
||||
|
||||
Reference in New Issue
Block a user