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
|
|
@ -1351,7 +1351,7 @@ void ObjectMgr::LoadCreatures()
|
|||
void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1367,7 +1367,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
|
|||
void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1573,7 +1573,7 @@ void ObjectMgr::LoadGameObjectAddon()
|
|||
void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1589,7 +1589,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
|
|||
void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -2659,7 +2659,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
|||
pLevelInfo->mana = fields[3].GetUInt16();
|
||||
pLevelInfo->armor = fields[9].GetUInt16();
|
||||
|
||||
for (int i = 0; i < MAX_STATS; i++)
|
||||
for (int i = 0; i < MAX_STATS; ++i)
|
||||
{
|
||||
pLevelInfo->stats[i] = fields[i + 4].GetUInt16();
|
||||
}
|
||||
|
|
@ -3515,7 +3515,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
bar2.step();
|
||||
Field* fields = result->Fetch();
|
||||
count++;
|
||||
++count;
|
||||
|
||||
uint32 memberGuidlow = fields[0].GetUInt32();
|
||||
ObjectGuid memberGuid = ObjectGuid(HIGHGUID_PLAYER, memberGuidlow);
|
||||
|
|
@ -3585,7 +3585,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
bar2.step();
|
||||
Field* fields = result->Fetch();
|
||||
count++;
|
||||
++count;
|
||||
|
||||
uint32 leaderGuidLow = fields[0].GetUInt32();
|
||||
uint32 mapId = fields[1].GetUInt32();
|
||||
|
|
@ -4660,7 +4660,7 @@ void ObjectMgr::LoadInstanceTemplate()
|
|||
SQLInstanceLoader loader;
|
||||
loader.Load(sInstanceTemplate);
|
||||
|
||||
for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
|
||||
for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; ++i)
|
||||
{
|
||||
InstanceTemplate const* temp = GetInstanceTemplate(i);
|
||||
if (!temp)
|
||||
|
|
@ -5981,7 +5981,7 @@ void ObjectMgr::LoadGameobjectInfo()
|
|||
loader.Load(sGOStorage);
|
||||
|
||||
// some checks
|
||||
for (uint32 id = 1; id < sGOStorage.MaxEntry; id++)
|
||||
for (uint32 id = 1; id < sGOStorage.MaxEntry; ++id)
|
||||
{
|
||||
GameObjectInfo const* goInfo = sGOStorage.LookupEntry<GameObjectInfo>(id);
|
||||
if (!goInfo)
|
||||
|
|
@ -7350,7 +7350,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->_generic.questID) // quest related objects, has visual effects
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -7359,7 +7359,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->spellFocus.questID) // quest related objects, has visual effect
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -7368,7 +7368,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->goober.questId) //quests objects
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue