diff options
author | QAston <none@none> | 2009-02-06 23:01:07 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-02-06 23:01:07 +0100 |
commit | a38297f28f8a8341967fa8fe5b0919b6d6aa04fc (patch) | |
tree | fe4a7bbce25ede3bc40dcbd937e1c975989d5906 /src/game/StatSystem.cpp | |
parent | 5bdb0560ba6caa93829b838c93b6d4042c71b75d (diff) |
*Handle aura SPELL_AURA_MECHANIC_IMMUNITY_MASK.
*Fix a typo in ap bonus from stat calculation-thanks to megamage for pointing this.
--HG--
branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r-- | src/game/StatSystem.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index df0e677f0c2..3a98e215da7 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -72,12 +72,25 @@ bool Player::UpdateStats(Stats stat) break; } - - // Need update (exist AP from stat auras) - if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT, stat)) + if (stat == STAT_STRENGTH) + { + UpdateAttackPowerAndDamage(false); + if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat)) + UpdateAttackPowerAndDamage(true); + } + else if (stat == STAT_AGILITY) + { UpdateAttackPowerAndDamage(false); - if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat)) UpdateAttackPowerAndDamage(true); + } + else + { + // Need update (exist AP from stat auras) + if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT, stat)) + UpdateAttackPowerAndDamage(false); + if (HasAuraTypeWithMiscvalue(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT, stat)) + UpdateAttackPowerAndDamage(true); + } UpdateSpellDamageAndHealingBonus(); UpdateManaRegen(); |