* 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
2009-10-10 18:19:34 +02:00
parent c70c43c1b0
commit fe5a3e3c43
7 changed files with 13 additions and 67 deletions
+5 -17
View File
@@ -449,7 +449,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
m_baseSpellPower = 0;
m_baseFeralAP = 0;
m_baseManaRegen = 0;
m_armorPenetrationPct = 0.0f;
// Honor System
m_lastHonorUpdateTime = time(NULL);
@@ -5288,7 +5287,7 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
break;
case CR_ARMOR_PENETRATION:
if(affectStats)
UpdateArmorPenetration();
UpdateArmorPenetration(amount);
break;
}
}
@@ -11051,15 +11050,10 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
// update expertise and armor penetration - passive auras may need it
if( slot == EQUIPMENT_SLOT_MAINHAND )
{
UpdateExpertise(BASE_ATTACK);
UpdateArmorPenetration();
}
else if( slot == EQUIPMENT_SLOT_OFFHAND )
{
UpdateExpertise(OFF_ATTACK);
UpdateArmorPenetration();
}
switch(slot)
{
@@ -11209,7 +11203,6 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
}
UpdateExpertise(BASE_ATTACK);
UpdateArmorPenetration();
}
else if( slot == EQUIPMENT_SLOT_OFFHAND )
UpdateExpertise(OFF_ATTACK);
@@ -11219,7 +11212,7 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
case EQUIPMENT_SLOT_MAINHAND:
case EQUIPMENT_SLOT_OFFHAND:
case EQUIPMENT_SLOT_RANGED:
UpdateArmorPenetration();
RecalculateRating(CR_ARMOR_PENETRATION);
default:
break;
}
@@ -11336,21 +11329,16 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
case EQUIPMENT_SLOT_MAINHAND:
case EQUIPMENT_SLOT_OFFHAND:
case EQUIPMENT_SLOT_RANGED:
UpdateArmorPenetration();
RecalculateRating(CR_ARMOR_PENETRATION);
default:
break;
}
if( slot == EQUIPMENT_SLOT_MAINHAND )
{
UpdateExpertise(BASE_ATTACK);
UpdateArmorPenetration();
}
else if( slot == EQUIPMENT_SLOT_OFFHAND )
{
UpdateExpertise(OFF_ATTACK);
UpdateArmorPenetration();
}
// equipment visual show
SetVisibleItemSlot(slot, NULL);