diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-11-29 17:16:08 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-11-29 17:16:08 +0100 |
commit | 592ab3146320afbc720e04157ddeb50d686cbc41 (patch) | |
tree | 387ccd4fb202ab0b5077d4a4fda85cd45a0ca21d /src | |
parent | 7bdbcc5bdaf9f73ce285e1520304e42f3f4880df (diff) |
Scripts/Spells: removed broken Steady Shot energize spell_linked_spell fix and properly fix it via spell script
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index a3ebb2a2bfc..12797725746 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -31,7 +31,8 @@ namespace Scripts::Spells::Hunter { enum HunterSpells { - SPELL_HUN_IMPROVED_STEADY_SHOT_TRIGGERED = 53220 + SPELL_HUN_IMPROVED_STEADY_SHOT_TRIGGERED = 53220, + SPELL_HUN_STEADY_SHOT_ENERGIZE = 77443 }; enum HunterSpellFamilies @@ -85,10 +86,31 @@ namespace Scripts::Spells::Hunter private: uint8 _steadyShotCount = 0; }; + + // 56641 - Steady Shot + class spell_hun_steady_shot : public SpellScript + { + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HUN_STEADY_SHOT_ENERGIZE }); + } + + // Cast the energize spell when successfully launching the spell against a target. Will not trigger when the target is missed (intentional) + void HandleEnergize(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(nullptr, SPELL_HUN_STEADY_SHOT_ENERGIZE, CastSpellExtraArgs(TRIGGERED_FULL_MASK)); + } + + void Register() override + { + OnEffectLaunchTarget += SpellEffectFn(spell_hun_steady_shot::HandleEnergize, EFFECT_0, SPELL_EFFECT_NORMALIZED_WEAPON_DMG); + } + }; } void AddSC_hunter_spell_scripts() { using namespace Scripts::Spells::Hunter; RegisterSpellScript(spell_hun_improved_steady_shot); + RegisterSpellScript(spell_hun_steady_shot); } |