From 1ad4f8509c10198d7e2c6691a0f17292d6deac0e Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 16 Feb 2009 20:12:55 -0600 Subject: [7285] More code cleanups in static data structures use. Author: zhenya --HG-- branch : trunk --- src/game/Unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b695afe7804..3bd2eb0e54d 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -102,7 +102,7 @@ Unit::Unit() m_addDmgOnce = 0; for(int i = 0; i < MAX_TOTEM; ++i) - m_TotemSlot[i] = 0; + m_TotemSlot[i] = 0; m_ObjectSlot[0] = m_ObjectSlot[1] = m_ObjectSlot[2] = m_ObjectSlot[3] = 0; //m_Aura = NULL; @@ -119,9 +119,9 @@ Unit::Unit() m_ShapeShiftFormSpellId = 0; m_canModifyStats = false; - for (int i = 0; i < MAX_SPELL_IMMUNITY; i++) + for (int i = 0; i < MAX_SPELL_IMMUNITY; ++i) m_spellImmune[i].clear(); - for (int i = 0; i < UNIT_MOD_END; i++) + for (int i = 0; i < UNIT_MOD_END; ++i) { m_auraModifiersGroup[i][BASE_VALUE] = 0.0f; m_auraModifiersGroup[i][BASE_PCT] = 1.0f; @@ -131,12 +131,12 @@ Unit::Unit() // implement 50% base damage from offhand m_auraModifiersGroup[UNIT_MOD_DAMAGE_OFFHAND][TOTAL_PCT] = 0.5f; - for (int i = 0; i < 3; i++) + for (int i = 0; i < MAX_ATTACK; ++i) { m_weaponDamage[i][MINDAMAGE] = BASE_MINDAMAGE; m_weaponDamage[i][MAXDAMAGE] = BASE_MAXDAMAGE; } - for (int i = 0; i < MAX_STATS; i++) + for (int i = 0; i < MAX_STATS; ++i) m_createStats[i] = 0.0f; m_attacking = NULL; -- cgit v1.2.3