* 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:
+5
-17
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user