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 | |
| parent | 753fc3c3e0022e8d1a5d1c576342c211bcec4dd7 (diff) | |
Scripts/Spells: Implement hunter pvp talent Aspect of the Fox
| -rw-r--r-- | sql/updates/world/master/2025_05_05_01_world.sql | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_05_05_01_world.sql b/sql/updates/world/master/2025_05_05_01_world.sql new file mode 100644 index 00000000000..b126ee45246 --- /dev/null +++ b/sql/updates/world/master/2025_05_05_01_world.sql @@ -0,0 +1,4 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_aspect_of_the_fox'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(186257,'spell_hun_aspect_of_the_fox'), +(186258,'spell_hun_aspect_of_the_fox'); 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); |
