Core/Misc: Fixed thread-unsafe access to list of objects that should be spawned in a cell
This commit is contained in:
1 parent
7b4371e25d
commit
2e2a928204
4 files changed
+35
-27
No files matched your search
@@ -2263,6 +2263,19 @@ void ObjectMgr::LoadCreatures()
|
||||
TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " creatures in %u ms", _creatureDataStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
CellObjectGuids const* ObjectMgr::GetCellObjectGuids(uint32 mapid, uint8 spawnMode, uint32 cell_id)
|
||||
{
|
||||
if (CellObjectGuidsMap const* mapGuids = Trinity::Containers::MapGetValuePtr(_mapObjectGuidsStore, MAKE_PAIR32(mapid, spawnMode)))
|
||||
return Trinity::Containers::MapGetValuePtr(*mapGuids, cell_id);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CellObjectGuidsMap const* ObjectMgr::GetMapObjectGuids(uint32 mapid, uint8 spawnMode)
|
||||
{
|
||||
return Trinity::Containers::MapGetValuePtr(_mapObjectGuidsStore, MAKE_PAIR32(mapid, spawnMode));
|
||||
}
|
||||
|
||||
void ObjectMgr::AddCreatureToGrid(ObjectGuid::LowType guid, CreatureData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
|
||||
Reference in new issue
Block a user