diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-05-05 13:42:23 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-05-05 13:42:23 +0200 |
commit | f041721f125c71cb554110d21663ff96cd8d6fda (patch) | |
tree | 7aa983ce3466c4207c7400cb5a5ac686a47a0000 /src | |
parent | 753fc3c3e0022e8d1a5d1c576342c211bcec4dd7 (diff) |
Scripts/Spells: Implement hunter pvp talent Aspect of the Fox
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index a90d2b27e66..56673f124d6 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -39,6 +39,7 @@ enum HunterSpells SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_3 = 131952, SPELL_HUNTER_AIMED_SHOT = 19434, SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258, + SPELL_HUNTER_ASPECT_OF_THE_FOX = 1219162, SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA = 205769, SPELL_HUNTER_BINDING_SHOT = 109248, SPELL_HUNTER_CONCUSSIVE_SHOT = 5116, @@ -155,6 +156,32 @@ class spell_hun_aspect_cheetah : public AuraScript } }; +// 1219162 - Aspect of the Fox (atatched to 186257 - Aspect of the Cheetah) +class spell_hun_aspect_of_the_fox : public SpellScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ SPELL_HUNTER_ASPECT_OF_THE_FOX }) + && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }) + && spellInfo->GetEffect(EFFECT_2).IsAura(SPELL_AURA_CAST_WHILE_WALKING); + } + + bool Load() override + { + return !GetCaster()->HasAura(SPELL_HUNTER_ASPECT_OF_THE_FOX); + } + + static void HandleCastWhileWalking(WorldObject*& target) + { + target = nullptr; + } + + void Register() override + { + OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_hun_aspect_of_the_fox::HandleCastWhileWalking, EFFECT_2, TARGET_UNIT_CASTER); + } +}; + // 186265 - Aspect of the Turtle class spell_hun_aspect_of_the_turtle : public AuraScript { @@ -1125,6 +1152,7 @@ void AddSC_hunter_spell_scripts() { RegisterSpellScript(spell_hun_a_murder_of_crows); RegisterSpellScript(spell_hun_aspect_cheetah); + RegisterSpellScript(spell_hun_aspect_of_the_fox); RegisterSpellScript(spell_hun_aspect_of_the_turtle); RegisterSpellScript(spell_hun_cobra_sting); RegisterSpellScript(spell_hun_concussive_shot); |