mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement hunter pvp talent Aspect of the Fox
This commit is contained in:
4
sql/updates/world/master/2025_05_05_01_world.sql
Normal file
4
sql/updates/world/master/2025_05_05_01_world.sql
Normal 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');
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user