Scripts/Priest: Implemented Priest talent Surge of Light

Port From (https://github.com/TrinityCore/TrinityCore/commit/f63816fbf1718bf678e5bd5bc9ea7448d22a4ea2)
This commit is contained in:
hondacrx
2024-02-28 18:22:38 -05:00
parent 7b248d5d15
commit 7d85ff0ab8
+34
View File
@@ -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
{