From 3c2bb6829cffc128d451c91a0ff6a9a419511081 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 3 Feb 2024 22:10:09 -0500 Subject: [PATCH] Scripts/Spells: Implement Aspect of the Turtle Port From (https://github.com/TrinityCore/TrinityCore/commit/f038c8526a2993ea9c71e47869cc4ae658159089) --- Source/Scripts/Spells/Hunter.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Source/Scripts/Spells/Hunter.cs b/Source/Scripts/Spells/Hunter.cs index ae6724956..b67859f83 100644 --- a/Source/Scripts/Spells/Hunter.cs +++ b/Source/Scripts/Spells/Hunter.cs @@ -17,6 +17,7 @@ namespace Scripts.Spells.Hunter public const uint AMurderOfCrowsVisual2 = 131951; public const uint AMurderOfCrowsVisual3 = 131952; public const uint AspectCheetahSlow = 186258; + public const uint AspectOfTheTurtlePacifyAura = 205769; public const uint Exhilaration = 109304; public const uint ExhilarationPet = 128594; public const uint ExhilarationR2 = 231546; @@ -103,6 +104,31 @@ namespace Scripts.Spells.Hunter } } + [Script] // 186265 - Aspect of the Turtle + class spell_hun_aspect_of_the_turtle : AuraScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.AspectOfTheTurtlePacifyAura); + } + + void OnApply(AuraEffect aurEff, AuraEffectHandleModes mode) + { + GetTarget().CastSpell(GetTarget(), SpellIds.AspectOfTheTurtlePacifyAura, true); + } + + void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode) + { + GetTarget().RemoveAurasDueToSpell(SpellIds.AspectOfTheTurtlePacifyAura); + } + + public override void Register() + { + AfterEffectApply.Add(new EffectApplyHandler(OnApply, 0, AuraType.ModAttackerMeleeHitChance, AuraEffectHandleModes.Real)); + AfterEffectRemove.Add(new EffectApplyHandler(OnRemove, 0, AuraType.ModAttackerMeleeHitChance, AuraEffectHandleModes.Real)); + } + } + [Script] // 378750 - Cobra Sting class spell_hun_cobra_sting : AuraScript {