Scripts/Spells: Implement Aspect of the Turtle (#29485)

Closes #19608
This commit is contained in:
Aqua Deus
2023-12-08 15:28:03 +01:00
committed by GitHub
parent 1567c34a3e
commit f038c8526a
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_hun_aspect_of_the_turtle';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(186265, 'spell_hun_aspect_of_the_turtle');

View File

@@ -37,6 +37,7 @@ enum HunterSpells
SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_2 = 131951,
SPELL_HUNTER_A_MURDER_OF_CROWS_VISUAL_3 = 131952,
SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258,
SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA = 205769,
SPELL_HUNTER_EXHILARATION = 109304,
SPELL_HUNTER_EXHILARATION_PET = 128594,
SPELL_HUNTER_EXHILARATION_R2 = 231546,
@@ -132,6 +133,31 @@ class spell_hun_aspect_cheetah : public AuraScript
}
};
// 186265 - Aspect of the Turtle
class spell_hun_aspect_of_the_turtle : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA, true);
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(SPELL_HUNTER_ASPECT_OF_THE_TURTLE_PACIFY_AURA);
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_aspect_of_the_turtle::OnApply, EFFECT_0, SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_aspect_of_the_turtle::OnRemove, EFFECT_0, SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE, AURA_EFFECT_HANDLE_REAL);
}
};
// 378750 - Cobra Sting
class spell_hun_cobra_sting : public AuraScript
{
@@ -783,6 +809,7 @@ void AddSC_hunter_spell_scripts()
{
RegisterSpellScript(spell_hun_a_murder_of_crows);
RegisterSpellScript(spell_hun_aspect_cheetah);
RegisterSpellScript(spell_hun_aspect_of_the_turtle);
RegisterSpellScript(spell_hun_cobra_sting);
RegisterSpellScript(spell_hun_exhilaration);
RegisterSpellScript(spell_hun_explosive_shot);