Backed out changeset d3fe2d6d504a (please test your patches thoroughly before getting me to push them ogeraisi)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-14 16:49:23 -07:00
parent b37f9b1e55
commit 140ec674a0
34 changed files with 111 additions and 147 deletions

View File

@@ -151,7 +151,6 @@ bool Player::UpdateAllStats()
UpdateAllSpellCritChances();
UpdateDefenseBonusesMod();
UpdateShieldBlockValue();
UpdateArmorPenetration();
UpdateSpellDamageAndHealingBonus();
UpdateManaRegen();
UpdateExpertise(BASE_ATTACK);
@@ -687,30 +686,6 @@ void Player::UpdateExpertise(WeaponAttackType attack)
}
}
void Player::UpdateArmorPenetration()
{
m_armorPenetrationPct = GetRatingBonusValue(CR_ARMOR_PENETRATION);
AuraList const& armorAuras = GetAurasByType(SPELL_AURA_MOD_TARGET_ARMOR_PCT);
for(AuraList::const_iterator itr = armorAuras.begin(); itr != armorAuras.end(); ++itr)
{
// affects all weapons
if((*itr)->GetSpellProto()->EquippedItemClass == -1)
{
m_armorPenetrationPct += (*itr)->GetModifier()->m_amount;
continue;
}
// dependent on weapon class
for(uint8 i = 0; i < MAX_ATTACK; ++i)
{
Item *weapon = GetWeaponForAttack(WeaponAttackType(i));
if(weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellProto()))
m_armorPenetrationPct += (*itr)->GetModifier()->m_amount;
}
}
}
void Player::ApplyManaRegenBonus(int32 amount, bool apply)
{
m_baseManaRegen+= apply ? amount : -amount;