refactor(Scripts/TempestKeep): Clean up script files (#17727)
This commit is contained in:
@@ -36,13 +36,7 @@ enum Spells
|
|||||||
|
|
||||||
struct boss_gatewatcher_gyrokill : public BossAI
|
struct boss_gatewatcher_gyrokill : public BossAI
|
||||||
{
|
{
|
||||||
boss_gatewatcher_gyrokill(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL)
|
boss_gatewatcher_gyrokill(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_GYROKILL) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,13 +37,7 @@ enum Spells
|
|||||||
|
|
||||||
struct boss_gatewatcher_iron_hand : public BossAI
|
struct boss_gatewatcher_iron_hand : public BossAI
|
||||||
{
|
{
|
||||||
boss_gatewatcher_iron_hand(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND)
|
boss_gatewatcher_iron_hand(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,13 +48,7 @@ enum Yells
|
|||||||
|
|
||||||
struct boss_mechano_lord_capacitus : public BossAI
|
struct boss_mechano_lord_capacitus : public BossAI
|
||||||
{
|
{
|
||||||
boss_mechano_lord_capacitus(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS)
|
boss_mechano_lord_capacitus(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,13 +46,7 @@ enum Spells
|
|||||||
|
|
||||||
struct boss_nethermancer_sepethrea : public BossAI
|
struct boss_nethermancer_sepethrea : public BossAI
|
||||||
{
|
{
|
||||||
boss_nethermancer_sepethrea(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA)
|
boss_nethermancer_sepethrea(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanAIAttack(Unit const* target) const override
|
bool CanAIAttack(Unit const* target) const override
|
||||||
{
|
{
|
||||||
@@ -165,7 +159,7 @@ struct npc_raging_flames : public ScriptedAI
|
|||||||
|
|
||||||
FixateRandomTarget();
|
FixateRandomTarget();
|
||||||
|
|
||||||
_scheduler.Schedule(15s, 25s, [this](TaskContext task)
|
scheduler.Schedule(15s, 25s, [this](TaskContext task)
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_INFERNO);
|
DoCastSelf(SPELL_INFERNO);
|
||||||
FixateRandomTarget();
|
FixateRandomTarget();
|
||||||
@@ -176,7 +170,7 @@ struct npc_raging_flames : public ScriptedAI
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
_scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
@@ -189,13 +183,10 @@ struct npc_raging_flames : public ScriptedAI
|
|||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_scheduler.Update(diff);
|
scheduler.Update(diff);
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
TaskScheduler _scheduler;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_ragin_flames_inferno : public AuraScript
|
class spell_ragin_flames_inferno : public AuraScript
|
||||||
|
|||||||
@@ -56,13 +56,7 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_pathaleon_the_calculator : public BossAI
|
struct boss_pathaleon_the_calculator : public BossAI
|
||||||
{
|
{
|
||||||
boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR)
|
boss_pathaleon_the_calculator(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool _isEnraged;
|
bool _isEnraged;
|
||||||
|
|
||||||
|
|||||||
@@ -50,13 +50,7 @@ enum Misc
|
|||||||
|
|
||||||
struct boss_harbinger_skyriss : public BossAI
|
struct boss_harbinger_skyriss : public BossAI
|
||||||
{
|
{
|
||||||
boss_harbinger_skyriss(Creature* creature) : BossAI(creature, DATA_WARDEN_MELLICHAR)
|
boss_harbinger_skyriss(Creature* creature) : BossAI(creature, DATA_WARDEN_MELLICHAR) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,11 +67,6 @@ struct boss_wrath_scryer_soccothrates : public BossAI
|
|||||||
boss_wrath_scryer_soccothrates(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
|
boss_wrath_scryer_soccothrates(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
|
||||||
{
|
{
|
||||||
preFight = instance->GetBossState(DATA_DALLIAH) == DONE;
|
preFight = instance->GetBossState(DATA_DALLIAH) == DONE;
|
||||||
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
|
|||||||
@@ -37,13 +37,7 @@ enum Spells
|
|||||||
|
|
||||||
struct boss_zereketh_the_unbound : public BossAI
|
struct boss_zereketh_the_unbound : public BossAI
|
||||||
{
|
{
|
||||||
boss_zereketh_the_unbound(Creature* creature) : BossAI(creature, DATA_ZEREKETH)
|
boss_zereketh_the_unbound(Creature* creature) : BossAI(creature, DATA_ZEREKETH) { }
|
||||||
{
|
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ struct boss_high_botanist_freywinn : public BossAI
|
|||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
|
scheduler.ClearValidator();
|
||||||
|
|
||||||
_JustEngagedWith();
|
_JustEngagedWith();
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ struct boss_thorngrin_the_tender : public BossAI
|
|||||||
{
|
{
|
||||||
me->m_SightDistance = 100.0f;
|
me->m_SightDistance = 100.0f;
|
||||||
_intro = false;
|
_intro = false;
|
||||||
scheduler.SetValidator([this]
|
|
||||||
{
|
|
||||||
return !me->HasUnitState(UNIT_STATE_CASTING);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
|
|||||||
Reference in New Issue
Block a user