[7730] Some optimizantion and code style. Author: zhenya

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-04-29 00:26:07 -05:00
1 parent 9dd4b8c985
commit de11b9e901
60 files changed
+264 -264

No files matched your search

+12 -12
View File
@@ -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();)