diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-06-12 18:55:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-12 18:55:57 +0200 |
commit | 2abf19e83286bdc60765bdc1caf3a78c900e2d99 (patch) | |
tree | 3573e227ce92fbb99116152b615211086bf52259 /src | |
parent | 58a380b73ac3ed779175be463a1dc3da7c65c04d (diff) |
Scripts/Spells: Implement hunter talent Precise Shots (#31049)
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 11dca702e84..062ac2d5d62 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -71,6 +71,7 @@ enum HunterSpells SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF = 55711, SPELL_HUNTER_POSTHASTE_INCREASE_SPEED = 118922, SPELL_HUNTER_POSTHASTE_TALENT = 109215, + SPELL_HUNTER_PRECISE_SHOTS = 260242, SPELL_HUNTER_RAPID_FIRE = 257044, SPELL_HUNTER_RAPID_FIRE_DAMAGE = 257045, SPELL_HUNTER_RAPID_FIRE_ENERGIZE = 263585, @@ -751,6 +752,28 @@ class spell_hun_posthaste : public SpellScript } }; +// 260240 - Precise Shots +class spell_hun_precise_shots : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_PRECISE_SHOTS }); + } + + void HandleProc(ProcEventInfo const& eventInfo) const + { + eventInfo.GetActor()->CastSpell(eventInfo.GetActor(), SPELL_HUNTER_PRECISE_SHOTS, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringSpell = eventInfo.GetProcSpell() + }); + } + + void Register() override + { + OnProc += AuraProcFn(spell_hun_precise_shots::HandleProc); + } +}; + // 257044 - Rapid Fire class spell_hun_rapid_fire : public AuraScript { @@ -1249,6 +1272,7 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_multi_shot); RegisterSpellScript(spell_hun_pet_heart_of_the_phoenix); RegisterSpellScript(spell_hun_posthaste); + RegisterSpellScript(spell_hun_precise_shots); RegisterSpellScript(spell_hun_rapid_fire); RegisterSpellScript(spell_hun_rapid_fire_damage); RegisterSpellScript(spell_hun_rejuvenating_wind); |