fix(Scripts/ZulAman): Zul'jin Add Cooldown to EnergyStorm proc (#21132)

This commit is contained in:
Jelle Meeus
2025-01-10 22:12:34 +01:00
committed by GitHub
parent 89204a4cdc
commit 564ccd945a
2 changed files with 31 additions and 6 deletions

View File

@@ -385,12 +385,6 @@ struct npc_zuljin_vortex : public ScriptedAI
ChangeToNewPlayer();
}
void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (spell->Id == SPELL_ZAP_INFORM)
DoCast(caster, SPELL_ZAP_DAMAGE, true);
}
void ChangeToNewPlayer()
{
DoResetThreatList();
@@ -440,9 +434,33 @@ class spell_claw_rage_aura : public AuraScript
}
};
// 42577 - Zap
class spell_zuljin_zap : public SpellScript
{
PrepareSpellScript(spell_zuljin_zap);
bool Validate(SpellInfo const* /*spell*/) override
{
return ValidateSpellInfo({ SPELL_ZAP_DAMAGE });
}
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* victim = GetHitUnit())
victim->CastSpell(GetCaster(), SPELL_ZAP_DAMAGE, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_zuljin_zap::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_boss_zuljin()
{
RegisterZulAmanCreatureAI(boss_zuljin);
RegisterZulAmanCreatureAI(npc_zuljin_vortex);
RegisterSpellScript(spell_claw_rage_aura);
RegisterSpellScript(spell_zuljin_zap);
}