* Backout a part of the latest Mangos merge, armor penetration related. Please first check whether or not we need the code, then test it, then push to repo, one change per commit.

--HG--
branch : trunk
This commit is contained in:
Machiavelli committed 2009-10-10 18:19:34 +02:00
1 parent c70c43c1b0
commit fe5a3e3c43
7 files changed
+13 -67

No files matched your search

+2 -4
View File
@@ -1653,7 +1653,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
if ( GetTypeId() == TYPEID_PLAYER )
{
AuraEffectList const& ResIgnoreAuras = GetAurasByType(SPELL_AURA_MOD_TARGET_ARMOR_PCT);
AuraEffectList const& ResIgnoreAuras = GetAurasByType(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT);
for(AuraEffectList::const_iterator itr = ResIgnoreAuras.begin();itr != ResIgnoreAuras.end(); ++itr)
{
// item neutral spell
@@ -1691,11 +1691,9 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt
float armorPen = maxArmorPen*((Player*)this)->GetRatingBonusValue(CR_ARMOR_PENETRATION) / 100.0f;
// Got the value, apply it
armor -= armorPen;
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
}
// Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT
armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f;
if (armor < 0.0f)
armor = 0.0f;