From 56065010719d878e5bcc9ea1de5bf92356a4743b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 3 Feb 2024 14:06:55 -0500 Subject: [PATCH] Scripts/Spells: Update Anti-Magic Shell script to include versatility Port From (https://github.com/TrinityCore/TrinityCore/commit/e90fee78df874bf1e28d7879dff3547cbd466ceb) --- Source/Scripts/Spells/DeathKnight.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Scripts/Spells/DeathKnight.cs b/Source/Scripts/Spells/DeathKnight.cs index 1be415369..7417fd645 100644 --- a/Source/Scripts/Spells/DeathKnight.cs +++ b/Source/Scripts/Spells/DeathKnight.cs @@ -121,6 +121,10 @@ namespace Scripts.Spells.DeathKnight void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated) { amount = (int)MathFunctions.CalculatePct(maxHealth, absorbPct); + + Player player = GetUnitOwner().ToPlayer(); + if (player != null) + MathFunctions.AddPct(ref amount, player.GetRatingBonusValue(CombatRating.VersatilityDamageDone) + player.GetTotalAuraModifier(AuraType.ModVersatility)); } void Trigger(AuraEffect aurEff, DamageInfo dmgInfo, ref uint absorbAmount)