Scripts/Spells: Implement hunter pvp talent Aspect of the Fox

This commit is contained in:
Shauren
2025-05-05 13:42:23 +02:00
parent 753fc3c3e0
commit f041721f12
2 changed files with 32 additions and 0 deletions

View File

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

View File

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