mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[12066] Optimize some parts for ++C
This commit is contained in:
parent
ba86b02dd4
commit
3707b04330
48 changed files with 163 additions and 163 deletions
|
|
@ -2678,7 +2678,7 @@ bool ChatHandler::HandleAddItemSetCommand(char* args)
|
|||
DETAIL_LOG(GetMangosString(LANG_ADDITEMSET), itemsetId);
|
||||
|
||||
bool found = false;
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; id++)
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; ++id)
|
||||
{
|
||||
ItemPrototype const* pProto = sItemStorage.LookupEntry<ItemPrototype>(id);
|
||||
if (!pProto)
|
||||
|
|
@ -3167,7 +3167,7 @@ bool ChatHandler::HandleLookupItemSetCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in ItemSet.dbc
|
||||
for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sItemSetStore.GetNumRows(); ++id)
|
||||
{
|
||||
ItemSetEntry const* set = sItemSetStore.LookupEntry(id);
|
||||
if (set)
|
||||
|
|
@ -3230,7 +3230,7 @@ bool ChatHandler::HandleLookupSkillCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in SkillLine.dbc
|
||||
for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); ++id)
|
||||
{
|
||||
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
|
||||
if (skillInfo)
|
||||
|
|
@ -3355,7 +3355,7 @@ bool ChatHandler::HandleLookupSpellCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in Spell.dbc
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
|
||||
if (spellInfo)
|
||||
|
|
@ -3532,7 +3532,7 @@ bool ChatHandler::HandleLookupObjectCommand(char* args)
|
|||
|
||||
uint32 counter = 0;
|
||||
|
||||
for (uint32 id = 0; id < sGOStorage.MaxEntry; id++)
|
||||
for (uint32 id = 0; id < sGOStorage.MaxEntry; ++id)
|
||||
{
|
||||
GameObjectInfo const* gInfo = sGOStorage.LookupEntry<GameObjectInfo>(id);
|
||||
if (!gInfo)
|
||||
|
|
@ -3598,7 +3598,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in TaxiNodes.dbc
|
||||
for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); ++id)
|
||||
{
|
||||
TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id);
|
||||
if (nodeEntry)
|
||||
|
|
@ -6460,7 +6460,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
|
|||
}
|
||||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
PSendSysMessage("player binds: %d", counter);
|
||||
|
|
@ -6483,7 +6483,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
|
|||
}
|
||||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6537,7 +6537,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(char* args)
|
|||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
player->UnbindInstance(itr, Difficulty(i));
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue