diff options
author | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-29 00:26:07 -0500 |
commit | de11b9e901d1d1caa0634fad541f08f11c5781af (patch) | |
tree | e35503d08ef545e668b8d854da41e0ea6aba3b3b /src/game/StatSystem.cpp | |
parent | 9dd4b8c98599b0bdccea7b9acb61cb4e7a35da8f (diff) |
[7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r-- | src/game/StatSystem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index c24999e8fe5..4cf93760957 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -132,13 +132,13 @@ void Player::UpdateSpellDamageAndHealingBonus() // Get healing bonus for all schools SetStatInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, SpellBaseHealingBonus(SPELL_SCHOOL_MASK_ALL)); // Get damage bonus for all schools - for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; i++) + for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, SpellBaseDamageBonus(SpellSchoolMask(1 << i))); } bool Player::UpdateAllStats() { - for (int i = STAT_STRENGTH; i < MAX_STATS; i++) + for (int i = STAT_STRENGTH; i < MAX_STATS; ++i) { float value = GetTotalStatValue(Stats(i)); SetStat(Stats(i), (int32)value); @@ -149,7 +149,7 @@ bool Player::UpdateAllStats() UpdateArmor(); UpdateMaxHealth(); - for(int i = POWER_MANA; i < MAX_POWERS; i++) + for(int i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); UpdateAllCritPercentages(); @@ -160,7 +160,7 @@ bool Player::UpdateAllStats() UpdateManaRegen(); UpdateExpertise(BASE_ATTACK); UpdateExpertise(OFF_ATTACK); - for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) + for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) UpdateResistances(i); return true; @@ -638,7 +638,7 @@ void Player::UpdateSpellHitChances() void Player::UpdateAllSpellCritChances() { - for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) + for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) UpdateSpellCritChance(i); } @@ -925,13 +925,13 @@ bool Pet::UpdateStats(Stats stat) bool Pet::UpdateAllStats() { - for (int i = STAT_STRENGTH; i < MAX_STATS; i++) + for (int i = STAT_STRENGTH; i < MAX_STATS; ++i) UpdateStats(Stats(i)); - for(int i = POWER_MANA; i < MAX_POWERS; i++) + for(int i = POWER_MANA; i < MAX_POWERS; ++i) UpdateMaxPower(Powers(i)); - for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++) + for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i) UpdateResistances(i); return true; |