From 7d85ff0ab8c495ae387a67f527c3747097f0c023 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 28 Feb 2024 18:22:38 -0500 Subject: [PATCH] Scripts/Priest: Implemented Priest talent Surge of Light Port From (https://github.com/TrinityCore/TrinityCore/commit/f63816fbf1718bf678e5bd5bc9ea7448d22a4ea2) --- Source/Scripts/Spells/Priest.cs | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Source/Scripts/Spells/Priest.cs b/Source/Scripts/Spells/Priest.cs index 2b2cd17b8..cd92328bf 100644 --- a/Source/Scripts/Spells/Priest.cs +++ b/Source/Scripts/Spells/Priest.cs @@ -145,6 +145,8 @@ namespace Scripts.Spells.Priest public const uint SpiritOfRedemption = 27827; public const uint StrengthOfSoul = 197535; public const uint StrengthOfSoulEffect = 197548; + public const uint SurgeOfLight = 109186; + public const uint SurgeOfLightEffect = 114255; public const uint TranquilLight = 196816; public const uint ThePenitentAura = 200347; public const uint TrailOfLightHeal = 234946; @@ -2568,6 +2570,38 @@ namespace Scripts.Spells.Priest } } + [Script] // 109186 - Surge of Light + class spell_pri_surge_of_light : AuraScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.Smite, SpellIds.SurgeOfLightEffect); + } + + bool CheckProc(ProcEventInfo eventInfo) + { + if (eventInfo.GetSpellInfo().Id == SpellIds.Smite) + return true; + + if (eventInfo.GetSpellInfo().SpellFamilyName == SpellFamilyNames.Priest) + return eventInfo.GetHealInfo() != null; + + return false; + } + + void HandleEffectProc(AuraEffect aurEff, ProcEventInfo eventInfo) + { + if (RandomHelper.randChance(aurEff.GetAmount())) + GetTarget().CastSpell(GetTarget(), SpellIds.SurgeOfLightEffect, aurEff); + } + + public override void Register() + { + DoCheckProc.Add(new(CheckProc)); + OnEffectProc.Add(new(HandleEffectProc, 0, AuraType.Dummy)); + } + } + [Script] // 28809 - Greater Heal class spell_pri_t3_4p_bonus : AuraScript {