aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2009-10-10 18:19:34 +0200
committerMachiavelli <none@none>2009-10-10 18:19:34 +0200
commitfe5a3e3c431f897497264beb255b22eeb318d3cf (patch)
tree0b2d12f6a58e84ad221f018227b157b7d86a90bf /src/game/StatSystem.cpp
parentc70c43c1b0ce53ee64c3abfcc9e9cc97a8992250 (diff)
* 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
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index b662769b77f..56bde0e5442 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -151,7 +151,6 @@ bool Player::UpdateAllStats()
UpdateAllSpellCritChances();
UpdateDefenseBonusesMod();
UpdateShieldBlockValue();
- UpdateArmorPenetration();
UpdateSpellDamageAndHealingBonus();
UpdateManaRegen();
UpdateExpertise(BASE_ATTACK);
@@ -626,13 +625,13 @@ void Player::UpdateSpellCritChance(uint32 school)
// Store crit value
SetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1 + school, crit);
}
-/*
+
void Player::UpdateArmorPenetration(int32 amount)
{
// Store Rating Value
SetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + CR_ARMOR_PENETRATION, amount);
}
-*/
+
void Player::UpdateMeleeHitChances()
{
m_modMeleeHitChance = GetTotalAuraModifier(SPELL_AURA_MOD_HIT_CHANCE);
@@ -688,33 +687,6 @@ void Player::UpdateExpertise(WeaponAttackType attack)
}
}
-void Player::UpdateArmorPenetration()
-{
- m_armorPenetrationPct = GetRatingBonusValue(CR_ARMOR_PENETRATION);
-
- AuraEffectList const& armorAuras = GetAurasByType(SPELL_AURA_MOD_TARGET_ARMOR_PCT);
- for(AuraEffectList::const_iterator itr = armorAuras.begin(); itr != armorAuras.end(); ++itr)
- {
- // affects all weapons
- if((*itr)->GetSpellProto()->EquippedItemClass == -1)
- {
- m_armorPenetrationPct += (*itr)->GetAmount();
- 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)->GetAmount();
- break;
- }
- }
- }
-}
-
void Player::ApplyManaRegenBonus(int32 amount, bool apply)
{
m_baseManaRegen+= apply ? amount : -amount;