diff options
Diffstat (limited to 'src/game/Player.cpp')
| -rw-r--r-- | src/game/Player.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index de731b5c5b5..07ef0ba63f3 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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); |
