[DiscordArchive] but is there a way to specifically load a single map?
[DiscordArchive] but is there a way to specifically load a single map?
Archived author: Linguster • Posted: 2023-04-20T10:15:55.077000+00:00
Original source
but is there a way to specifically load a single map?
Archived author: Linguster • Posted: 2023-04-20T10:16:04.123000+00:00
Original source
say I wanted to just preload map 0
Archived author: Anchy • Posted: 2023-04-20T10:19:54.522000+00:00
Original source
not that I see, but it wouldn't be hard to implement
Archived author: Anchy • Posted: 2023-04-20T10:22:22.060000+00:00
Original source
```cpp
if (sWorld->getBoolConfig(CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS))
{
LOG_INFO("server.loading", "Loading All Grids For All Non-Instanced Maps...");
for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)
{
MapEntry const* mapEntry = sMapStore.LookupEntry(i);
if (mapEntry && !mapEntry->Instanceable())
{
Map* map = sMapMgr->CreateBaseMap(mapEntry->MapID);
if (map)
{
LOG_INFO("server.loading", ">> Loading All Grids For Map {}", map->GetId());
map->LoadAllCells();
}
}
}
}```
Archived author: Anchy • Posted: 2023-04-20T10:22:44.459000+00:00
Original source
that's the code for pre-loading, so it would be quite easy to load just the maps you want