aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index dac9f91a16e..5fec651dd47 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -1671,21 +1671,9 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
}
}
- // Apply Player CR_ARMOR_PENETRATION rating
+ // Apply Player CR_ARMOR_PENETRATION rating and percent talents
if (GetTypeId()==TYPEID_PLAYER)
- {
- float maxArmorPen=0;
- if (getLevel()<60)
- maxArmorPen=400+85*pVictim->getLevel();
- else
- maxArmorPen=400+85*pVictim->getLevel()+4.5*85*(pVictim->getLevel()-59);
- // Cap armor penetration to this number
- maxArmorPen = std::min(((armor+maxArmorPen)/3),armor);
- // Figure out how much armor do we ignore
- float armorPen = maxArmorPen*((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f;
- // Got the value, apply it
- armor -= armorPen;
- }
+ armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
//armor *= 1.0f - GetTotalAuraModifier(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT) / 100.0f;