From dc3d2def809499d5a3df75f65b84bf072b1bde84 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 24 Jul 2025 21:21:05 +0200 Subject: [PATCH] feat(Core/Load): Add debug logs for zone and area assignment (#22509) --- src/server/apps/worldserver/worldserver.conf.dist | 6 ++++-- src/server/game/Globals/ObjectMgr.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 83f2e0ba4..f2662fda9 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -4455,7 +4455,8 @@ Minigob.Manabonk.Enable = 1 # # Calculate.Creature.Zone.Area.Data -# Description: Calculate at loading creature zoneId / areaId and save in creature table (WARNING: SLOW WORLD SERVER STARTUP) +# Description: Calculate at loading creature zoneId / areaId and save in creature table +# WARNING: SLOW WORLD SERVER STARTUP. Should only be used for debugging. # Default: 0 - (Do not show) # @@ -4463,7 +4464,8 @@ Calculate.Creature.Zone.Area.Data = 0 # # Calculate.Gameoject.Zone.Area.Data -# Description: Calculate at loading gameobject zoneId / areaId and save in gameobject table (WARNING: SLOW WORLD SERVER STARTUP) +# Description: Calculate at loading gameobject zoneId / areaId and save in gameobject table +# WARNING: SLOW WORLD SERVER STARTUP. Should only be used for debugging. # Default: 0 - (Do not show) # diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 940f0b222..911749df0 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -2257,6 +2257,9 @@ void ObjectMgr::LoadCreatures() return; } + if (sWorld->getBoolConfig(CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA)) + LOG_INFO("server.loading", "Calculating zone and area fields. This may take a moment..."); + // Build single time for check spawnmask std::map spawnMasks; for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i) @@ -2621,6 +2624,9 @@ void ObjectMgr::LoadGameobjects() return; } + if (sWorld->getBoolConfig(CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA)) + LOG_INFO("server.loading", "Calculating zone and area fields. This may take a moment..."); + // build single time for check spawnmask std::map spawnMasks; for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)