diff options
author | Naddley <64811442+Naddley@users.noreply.github.com> | 2023-01-26 15:11:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 15:11:56 +0100 |
commit | 2a79be02fd60bf37bbef7702194a5379503970a1 (patch) | |
tree | cb1d772387b070f90d54c930b302831d3a1a976d /src | |
parent | 35775b0dfb2048775ef36e51700221ba19cbf9b4 (diff) |
Scripts/Hunter: Implement Explosive Shot (#28779)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c93c32398a8..fe174df2a4c 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -39,6 +39,7 @@ enum HunterSpells SPELL_HUNTER_EXHILARATION = 109304, SPELL_HUNTER_EXHILARATION_PET = 128594, SPELL_HUNTER_EXHILARATION_R2 = 231546, + SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE = 212680, SPELL_HUNTER_LONE_WOLF = 155228, SPELL_HUNTER_MASTERS_CALL_TRIGGERED = 62305, SPELL_HUNTER_MISDIRECTION = 34477, @@ -152,6 +153,28 @@ class spell_hun_exhilaration : public SpellScript } }; +// 212431 - Explosive Shot +class spell_hun_explosive_shot : public AuraScript +{ + PrepareAuraScript(spell_hun_explosive_shot); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE }); + } + + void HandlePeriodic(AuraEffect const* /*aurEff*/) + { + if (Unit* caster = GetCaster()) + caster->CastSpell(GetTarget(), SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE, true); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_explosive_shot::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } +}; + // 212658 - Hunting Party class spell_hun_hunting_party : public AuraScript { @@ -614,6 +637,7 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_a_murder_of_crows); RegisterSpellScript(spell_hun_aspect_cheetah); RegisterSpellScript(spell_hun_exhilaration); + RegisterSpellScript(spell_hun_explosive_shot); RegisterSpellScript(spell_hun_hunting_party); RegisterSpellScript(spell_hun_last_stand_pet); RegisterSpellScript(spell_hun_masters_call); |