From b37f9b1e55bd4b80597b8b8c3f461aad70ccc5c1 Mon Sep 17 00:00:00 2001 From: maximius Date: Mon, 14 Sep 2009 16:02:13 -0700 Subject: *Merged MaNGOS [8458], [8475], [8476] by ogeraisi, thanks to all authors :) --HG-- branch : trunk --- src/game/Unit.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/game/Unit.cpp') 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; -- cgit v1.2.3