refactor(Scripts/TempestKeep): Clean up script files (#17727)

This commit is contained in:
Andrew
2023-11-16 14:01:45 -03:00
committed by GitHub
parent 1f30a755dc
commit 79ef4fa671
10 changed files with 12 additions and 64 deletions

View File

@@ -36,13 +36,7 @@ enum Spells
struct boss_gatewatcher_gyrokill : public BossAI
{
boss_gatewatcher_gyrokill(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
boss_gatewatcher_gyrokill(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) { }
void JustDied(Unit* /*killer*/) override
{

View File

@@ -37,13 +37,7 @@ enum Spells
struct boss_gatewatcher_iron_hand : public BossAI
{
boss_gatewatcher_iron_hand(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
boss_gatewatcher_iron_hand(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) { }
void JustEngagedWith(Unit* /*who*/) override
{

View File

@@ -48,13 +48,7 @@ enum Yells
struct boss_mechano_lord_capacitus : public BossAI
{
boss_mechano_lord_capacitus(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
boss_mechano_lord_capacitus(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { }
void JustEngagedWith(Unit* /*who*/) override
{

View File

@@ -46,13 +46,7 @@ enum Spells
struct boss_nethermancer_sepethrea : public BossAI
{
boss_nethermancer_sepethrea(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
boss_nethermancer_sepethrea(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) { }
bool CanAIAttack(Unit const* target) const override
{
@@ -165,7 +159,7 @@ struct npc_raging_flames : public ScriptedAI
FixateRandomTarget();
_scheduler.Schedule(15s, 25s, [this](TaskContext task)
scheduler.Schedule(15s, 25s, [this](TaskContext task)
{
DoCastSelf(SPELL_INFERNO);
FixateRandomTarget();
@@ -176,7 +170,7 @@ struct npc_raging_flames : public ScriptedAI
void Reset() override
{
_scheduler.CancelAll();
scheduler.CancelAll();
}
void EnterEvadeMode(EvadeReason /*why*/) override
@@ -189,13 +183,10 @@ struct npc_raging_flames : public ScriptedAI
if (!UpdateVictim())
return;
_scheduler.Update(diff);
scheduler.Update(diff);
DoMeleeAttackIfReady();
}
private:
TaskScheduler _scheduler;
};
class spell_ragin_flames_inferno : public AuraScript

View File

@@ -56,13 +56,7 @@ enum Misc
struct boss_pathaleon_the_calculator : public BossAI
{
boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR)
{
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
bool _isEnraged;