aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2023-12-08 15:28:03 +0100
committerGitHub <noreply@github.com>2023-12-08 15:28:03 +0100
commitf038c8526a2993ea9c71e47869cc4ae658159089 (patch)
treee49f8ef42b84483478f7208d72e64b3e7ba09690
parent1567c34a3e4b4226dff6de5349d03e6402d63975 (diff)
Scripts/Spells: Implement Aspect of the Turtle (#29485)
Closes #19608
-rw-r--r--sql/updates/world/master/2023_12_08_03_world.sql3
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp27
2 files changed, 30 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_12_08_03_world.sql b/sql/updates/world/master/2023_12_08_03_world.sql
new file mode 100644
index 00000000000..ca95d5792f7
--- /dev/null
+++ b/sql/updates/world/master/2023_12_08_03_world.sql
@@ -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');
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 96d597c3eb3..6947b847131 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -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);