*Some code optimize.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-06 21:53:04 +01:00
parent dfd120b23c
commit ecfe941941
3 changed files with 16 additions and 2 deletions

View File

@@ -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();