Scripts/Spells: Implement hunter talent Precise Shots (#31049)

This commit is contained in:
Aqua Deus
2025-06-12 18:55:57 +02:00
committed by GitHub
parent 58a380b73a
commit 2abf19e832
2 changed files with 32 additions and 0 deletions

View File

@@ -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

View File

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