diff options
-rw-r--r-- | sql/updates/world/master/2025_06_12_00_world.sql | 8 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 24 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_06_12_00_world.sql b/sql/updates/world/master/2025_06_12_00_world.sql new file mode 100644 index 00000000000..25f93899c7b --- /dev/null +++ b/sql/updates/world/master/2025_06_12_00_world.sql @@ -0,0 +1,8 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_precise_shots'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(260240,'spell_hun_precise_shots'); + +DELETE FROM `spell_proc` WHERE `SpellId` IN (260240,260242); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(260240,0x00,9,0x00020000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x0,0x0,0x0,0,0,0,0), -- Precise Shots +(260242,0x00,9,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x0,0x0,0x0,0x18,0x0,0,0,0,0); -- Precise Shots 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); |