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/Level3.cpp | |
parent | 9dd4b8c98599b0bdccea7b9acb61cb4e7a35da8f (diff) |
[7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r-- | src/game/Level3.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index ca1ef59ec6c..11a148c6966 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -2295,7 +2295,7 @@ bool ChatHandler::HandleLearnAllMySpellsCommand(const char* /*args*/) return true; uint32 family = clsEntry->spellfamily; - for (uint32 i = 0; i < sSpellStore.GetNumRows(); i++) + for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(i); if(!spellInfo) @@ -2334,7 +2334,7 @@ bool ChatHandler::HandleLearnAllMyTalentsCommand(const char* /*args*/) Player* player = m_session->GetPlayer(); uint32 classMask = player->getClassMask(); - for (uint32 i = 0; i < sTalentStore.GetNumRows(); i++) + for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); if(!talentInfo) @@ -2409,7 +2409,7 @@ bool ChatHandler::HandleLearnAllMyPetTalentsCommand(const char* /*args*/) return false; } - for (uint32 i = 0; i < sTalentStore.GetNumRows(); i++) + for (uint32 i = 0; i < sTalentStore.GetNumRows(); ++i) { TalentEntry const *talentInfo = sTalentStore.LookupEntry(i); if(!talentInfo) @@ -4082,7 +4082,7 @@ bool ChatHandler::HandleAuraCommand(const char* args) uint8 eff_mask=0; if(spellInfo) { - for(uint32 i = 0;i<3;i++) + for(uint32 i = 0;i<3;++i) { uint8 eff = spellInfo->Effect[i]; if (eff>=TOTAL_SPELL_EFFECTS) @@ -4452,7 +4452,7 @@ bool ChatHandler::HandleExploreCheatCommand(const char* args) ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING,GetNameLink().c_str()); } - for (uint8 i=0; i<128; i++) + for (uint8 i=0; i<128; ++i) { if (flag != 0) { @@ -5117,7 +5117,7 @@ bool ChatHandler::HandleListAurasCommand (const char * /*args*/) IS_PLAYER_GUID(itr->second->GetCasterGUID()) ? "player" : "creature",GUID_LOPART(itr->second->GetCasterGUID())); } } - for (int i = 0; i < TOTAL_AURAS; i++) + for (int i = 0; i < TOTAL_AURAS; ++i) { Unit::AuraEffectList const& uAuraList = unit->GetAurasByType(AuraType(i)); if (uAuraList.empty()) continue; @@ -5809,7 +5809,7 @@ bool ChatHandler::HandleQuestComplete(const char* args) } // All creature/GO slain/casted (not required, but otherwise it will display "Creature slain 0/10") - for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++) + for(uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) { uint32 creature = pQuest->ReqCreatureOrGOId[i]; uint32 creaturecount = pQuest->ReqCreatureOrGOCount[i]; @@ -6926,10 +6926,10 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) Player* player = getSelectedPlayer(); if (!player) player = m_session->GetPlayer(); uint32 counter = 0; - for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++) + for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i) { Player::BoundInstancesMap &binds = player->GetBoundInstances(i); - for(Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end(); ++itr) + for(Player::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { InstanceSave *save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); @@ -6942,10 +6942,10 @@ bool ChatHandler::HandleInstanceListBindsCommand(const char* /*args*/) Group *group = player->GetGroup(); if(group) { - for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++) + for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i) { Group::BoundInstancesMap &binds = group->GetBoundInstances(i); - for(Group::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end(); ++itr) + for(Group::BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end(); ++itr) { InstanceSave *save = itr->second.save; std::string timeleft = GetTimeString(save->GetResetTime() - time(NULL)); @@ -6970,7 +6970,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char* args) Player* player = getSelectedPlayer(); if (!player) player = m_session->GetPlayer(); uint32 counter = 0; - for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++) + for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i) { Player::BoundInstancesMap &binds = player->GetBoundInstances(i); for(Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();) |