mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
fix(Scripts/TheEye): make sure Al'ar doesn't schedule abilities multiple times (#18553)
* init * fix
This commit is contained in:
@@ -115,6 +115,7 @@ struct boss_alar : public BossAI
|
|||||||
_canAttackCooldown = true;
|
_canAttackCooldown = true;
|
||||||
_baseAttackOverride = false;
|
_baseAttackOverride = false;
|
||||||
_spawnPhoenixes = false;
|
_spawnPhoenixes = false;
|
||||||
|
_hasPretendedToDie = false;
|
||||||
_transitionScheduler.CancelAll();
|
_transitionScheduler.CancelAll();
|
||||||
_platform = 0;
|
_platform = 0;
|
||||||
_noMelee = false;
|
_noMelee = false;
|
||||||
@@ -179,8 +180,9 @@ struct boss_alar : public BossAI
|
|||||||
|
|
||||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
||||||
{
|
{
|
||||||
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE)
|
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE && !_hasPretendedToDie)
|
||||||
{
|
{
|
||||||
|
_hasPretendedToDie = true;
|
||||||
damage = 0;
|
damage = 0;
|
||||||
DoCastSelf(SPELL_EMBER_BLAST, true);
|
DoCastSelf(SPELL_EMBER_BLAST, true);
|
||||||
PretendToDie(me);
|
PretendToDie(me);
|
||||||
@@ -224,6 +226,7 @@ struct boss_alar : public BossAI
|
|||||||
|
|
||||||
void ScheduleAbilities()
|
void ScheduleAbilities()
|
||||||
{
|
{
|
||||||
|
_transitionScheduler.CancelAll();
|
||||||
ScheduleTimedEvent(57s, [&]
|
ScheduleTimedEvent(57s, [&]
|
||||||
{
|
{
|
||||||
DoCastVictim(SPELL_MELT_ARMOR);
|
DoCastVictim(SPELL_MELT_ARMOR);
|
||||||
@@ -408,6 +411,7 @@ struct boss_alar : public BossAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool _hasPretendedToDie;
|
||||||
bool _canAttackCooldown;
|
bool _canAttackCooldown;
|
||||||
bool _baseAttackOverride;
|
bool _baseAttackOverride;
|
||||||
bool _spawnPhoenixes;
|
bool _spawnPhoenixes;
|
||||||
|
|||||||
Reference in New Issue
Block a user