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 | |
parent | 35775b0dfb2048775ef36e51700221ba19cbf9b4 (diff) |
Scripts/Hunter: Implement Explosive Shot (#28779)
-rw-r--r-- | sql/updates/world/master/2023_01_26_06_world.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_01_26_06_world.sql b/sql/updates/world/master/2023_01_26_06_world.sql new file mode 100644 index 00000000000..9721ddf395b --- /dev/null +++ b/sql/updates/world/master/2023_01_26_06_world.sql @@ -0,0 +1,4 @@ +-- Explosive Shot +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_hun_explosive_shot'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(212431, 'spell_hun_explosive_shot'); 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); |