Core/Units: Implemented versatility

This commit is contained in:
hondacrx
2018-04-29 19:40:29 -04:00
parent 3d6c47336c
commit 9c33d9c20e
6 changed files with 96 additions and 4 deletions
+9
View File
@@ -2782,6 +2782,15 @@ namespace Game.Entities
else
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModRangedDamageTakenPct);
// Versatility
Player modOwner = GetSpellModOwner();
if (modOwner)
{
// only 50% of SPELL_AURA_MOD_VERSATILITY for damage reduction
float versaBonus = modOwner.GetTotalAuraModifier(AuraType.ModVersatility) / 2.0f;
MathFunctions.AddPct(ref TakenTotalMod, -(modOwner.GetRatingBonusValue(CombatRating.VersatilityDamageTaken) + versaBonus));
}
float tmpDamage = 0.0f;
if (TakenTotalCasterMod != 0)