mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
feat(Core/Maps): Multithread startup map preloading (#22580)
This commit is contained in:
@@ -1010,15 +1010,23 @@ void World::SetInitialWorldSettings()
|
||||
|
||||
if (mapEntry && !mapEntry->Instanceable())
|
||||
{
|
||||
Map* map = sMapMgr->CreateBaseMap(mapEntry->MapID);
|
||||
|
||||
if (map)
|
||||
if (sMapMgr->GetMapUpdater()->activated())
|
||||
sMapMgr->GetMapUpdater()->schedule_map_preload(mapEntry->MapID);
|
||||
else
|
||||
{
|
||||
LOG_INFO("server.loading", ">> Loading All Grids For Map {}", map->GetId());
|
||||
map->LoadAllGrids();
|
||||
Map* map = sMapMgr->CreateBaseMap(mapEntry->MapID);
|
||||
|
||||
if (map)
|
||||
{
|
||||
LOG_INFO("server.loading", ">> Loading All Grids For Map {}", map->GetId());
|
||||
map->LoadAllGrids();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sMapMgr->GetMapUpdater()->activated())
|
||||
sMapMgr->GetMapUpdater()->wait();
|
||||
}
|
||||
|
||||
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
|
||||
|
||||
Reference in New Issue
Block a user