Scripts/Spells: Update Anti-Magic Shell script to include versatility

Port From (https://github.com/TrinityCore/TrinityCore/commit/e90fee78df874bf1e28d7879dff3547cbd466ceb)
This commit is contained in:
hondacrx
2024-02-03 14:06:55 -05:00
parent 89ad2414c4
commit 5606501071
+4
View File
@@ -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)