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

@@ -0,0 +1,7 @@
--
DELETE FROM `spell_script_names` WHERE `spell_id`=42577 AND `ScriptName`='spell_zuljin_zap';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(42577, 'spell_zuljin_zap');
-- 43983 Energy Storm, add CD to proc
DELETE FROM `spell_proc_event` WHERE `entry` = 43983;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(43983, 0, 0, 0, 0, 0, 0x4000|0x10000, 1|2, 1, 0.0, 100.0, 600);

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);
}