aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-02-06 21:53:04 +0100
committerQAston <none@none>2009-02-06 21:53:04 +0100
commitecfe941941039dd0aa16cda64b55dcf3a7170af5 (patch)
tree738f9863033855b1499f03bfb984fb359850f7be /src/game/StatSystem.cpp
parentdfd120b23c47006a4ba0b20f80a1521ad3d30fef (diff)
*Some code optimize.
--HG-- branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 7836b5336c5..798bf3299d0 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -71,9 +71,12 @@ bool Player::UpdateStats(Stats stat)
default:
break;
}
+
// Need update (exist AP from stat auras)
- UpdateAttackPowerAndDamage();
- UpdateAttackPowerAndDamage(true);
+ if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_MEELE_ATTACK_POWER_OF_STAT_PERCENT, stat))
+ UpdateAttackPowerAndDamage(false);
+ if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat))
+ UpdateAttackPowerAndDamage(true);
UpdateSpellDamageAndHealingBonus();
UpdateManaRegen();