diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-05-31 23:57:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-31 23:57:41 +0200 |
commit | 6f23a46bb493273b6ddb2eb808c50b3c3100d51a (patch) | |
tree | 26b019a6902d9c1a1da03cd08ebdb0e7dde04fc3 /src | |
parent | 5cdf27be3a69e9d7fb925f128e6f13a2e899087a (diff) |
Scripts/Spells: Implement hunter talent Streamline (#30941)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 90c2d9e052f..11dca702e84 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -78,6 +78,8 @@ enum HunterSpells SPELL_HUNTER_SCOUTS_INSTINCTS = 459455, SPELL_HUNTER_STEADY_SHOT = 56641, SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443, + SPELL_HUNTER_STREAMLINE_TALENT = 260367, + SPELL_HUNTER_STREAMLINE_BUFF = 342076, SPELL_HUNTER_T9_4P_GREATNESS = 68130, SPELL_HUNTER_T29_2P_MARKSMANSHIP_DAMAGE = 394371, SPELL_HUNTER_TAR_TRAP = 187699, @@ -955,6 +957,33 @@ class spell_hun_steady_shot : public SpellScript } }; +// 260367 - Streamline (attached to 257044 - Rapid Fire) +class spell_hun_streamline : public SpellScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUNTER_STREAMLINE_TALENT, SPELL_HUNTER_STREAMLINE_BUFF }); + } + + bool Load() override + { + return GetCaster()->HasAura(SPELL_HUNTER_STREAMLINE_TALENT); + } + + void HandleAfterCast() const + { + GetCaster()->CastSpell(GetCaster(), SPELL_HUNTER_STREAMLINE_BUFF, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringSpell = GetSpell() + }); + } + + void Register() override + { + AfterCast += SpellCastFn(spell_hun_streamline::HandleAfterCast); + } +}; + // 391559 - Surging Shots class spell_hun_surging_shots : public AuraScript { @@ -1228,6 +1257,7 @@ void AddSC_hunter_spell_scripts() RegisterSpellScript(spell_hun_scouts_instincts); RegisterSpellScript(spell_hun_scrappy); RegisterSpellScript(spell_hun_steady_shot); + RegisterSpellScript(spell_hun_streamline); RegisterSpellScript(spell_hun_surging_shots); RegisterSpellScript(spell_hun_tame_beast); RegisterAreaTriggerAI(areatrigger_hun_tar_trap); |