Scripts/Spells: Update Anti-Magic Shell script to include versatility
Port From (https://github.com/TrinityCore/TrinityCore/commit/e90fee78df874bf1e28d7879dff3547cbd466ceb)
This commit is contained in:
@@ -121,6 +121,10 @@ namespace Scripts.Spells.DeathKnight
|
|||||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||||
{
|
{
|
||||||
amount = (int)MathFunctions.CalculatePct(maxHealth, absorbPct);
|
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)
|
void Trigger(AuraEffect aurEff, DamageInfo dmgInfo, ref uint absorbAmount)
|
||||||
|
|||||||
Reference in New Issue
Block a user