Core/Pools: Implemented pooling for instances

This commit is contained in:
Shauren authored and Ovahlord committed 2022-12-29 11:56:56 +01:00
1 parent 317a9f2d32
commit 0f0b283168
10 files changed
+320 -200

No files matched your search

+8 -8
View File
@@ -2068,7 +2068,7 @@ void ObjectMgr::LoadCreatures()
data.movementType = fields[14].GetUInt8();
data.spawnMask = fields[15].GetUInt8();
int16 gameEvent = fields[16].GetInt8();
uint32 PoolId = fields[17].GetUInt32();
data.poolId = fields[17].GetUInt32();
data.npcflag = fields[18].GetUInt32();
data.unit_flags = fields[19].GetUInt32();
data.dynamicflags = fields[20].GetUInt32();
@@ -2208,8 +2208,8 @@ void ObjectMgr::LoadCreatures()
WorldDatabase.Execute(stmt);
}
// Add to grid if not managed by the game event or pool system
if (gameEvent == 0 && PoolId == 0)
// Add to grid if not managed by the game event
if (gameEvent == 0)
AddCreatureToGrid(guid, &data);
}
while (result->NextRow());
@@ -2359,10 +2359,10 @@ void ObjectMgr::LoadGameObjects()
data.spawnGroupData = GetLegacySpawnGroup(); // force compatibility group for transport spawns
int16 gameEvent = fields[15].GetInt8();
uint32 PoolId = fields[16].GetUInt32();
data.phaseUseFlags = fields[17].GetUInt8();
data.phaseId = fields[18].GetUInt32();
data.phaseGroup = fields[19].GetUInt32();
data.poolId = fields[16].GetUInt32();
data.phaseUseFlags = fields[17].GetUInt8();
data.phaseId = fields[18].GetUInt32();
data.phaseGroup = fields[19].GetUInt32();
if (data.phaseUseFlags & ~PHASE_USE_FLAGS_ALL)
{
@@ -2459,7 +2459,7 @@ void ObjectMgr::LoadGameObjects()
WorldDatabase.Execute(stmt);
}
if (gameEvent == 0 && PoolId == 0) // if not this is to be managed by GameEvent System or Pool system
if (gameEvent == 0) // if not this is to be managed by GameEvent System or Pool system
AddGameobjectToGrid(guid, &data);
}
while (result->NextRow());