aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/World
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-07-23 19:13:33 +0200
committerShauren <shauren.trinity@gmail.com>2022-07-23 19:13:33 +0200
commit16a06346aea16ffd6ee84081cedfdb0c75ac0b38 (patch)
tree61661f0914f1a19cc7f6a9bd04eabf9f8f6e846a /src/server/game/World
parent82138bec18751eb889f364169cb53481eb90cdbd (diff)
Core/Maps: Move terrain data handling out of Map class
Partial port of cmangos/mangos-wotlk@ff5232c64809207b5fa59d62e9870f58a36b6f3f
Diffstat (limited to 'src/server/game/World')
-rw-r--r--src/server/game/World/World.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 502afce812b..0d2fd838d75 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -89,6 +89,7 @@
#include "SmartScriptMgr.h"
#include "SupportMgr.h"
#include "TaxiPathGraph.h"
+#include "TerrainMgr.h"
#include "TransportMgr.h"
#include "Unit.h"
#include "UpdateTime.h"
@@ -1743,15 +1744,15 @@ void World::SetInitialWorldSettings()
sObjectMgr->SetHighestGuids();
///- Check the existence of the map files for all races' startup areas.
- if (!MapManager::ExistMapAndVMap(0, -6240.32f, 331.033f)
- || !MapManager::ExistMapAndVMap(0, -8949.95f, -132.493f)
- || !MapManager::ExistMapAndVMap(1, -618.518f, -4251.67f)
- || !MapManager::ExistMapAndVMap(0, 1676.35f, 1677.45f)
- || !MapManager::ExistMapAndVMap(1, 10311.3f, 832.463f)
- || !MapManager::ExistMapAndVMap(1, -2917.58f, -257.98f)
+ if (!TerrainMgr::ExistMapAndVMap(0, -6240.32f, 331.033f)
+ || !TerrainMgr::ExistMapAndVMap(0, -8949.95f, -132.493f)
+ || !TerrainMgr::ExistMapAndVMap(1, -618.518f, -4251.67f)
+ || !TerrainMgr::ExistMapAndVMap(0, 1676.35f, 1677.45f)
+ || !TerrainMgr::ExistMapAndVMap(1, 10311.3f, 832.463f)
+ || !TerrainMgr::ExistMapAndVMap(1, -2917.58f, -257.98f)
|| (m_int_configs[CONFIG_EXPANSION] && (
- !MapManager::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
- !MapManager::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
+ !TerrainMgr::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
+ !TerrainMgr::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
{
TC_LOG_FATAL("server.loading", "Unable to load critical files - server shutting down !!!");
exit(1);
@@ -1821,7 +1822,7 @@ void World::SetInitialWorldSettings()
mapData[mapEntry->CosmeticParentMapID].push_back(mapEntry->ID);
}
- sMapMgr->InitializeParentMapData(mapData);
+ sTerrainMgr.InitializeParentMapData(mapData);
vmmgr2->InitializeThreadUnsafe(mapData);
@@ -2737,6 +2738,11 @@ void World::Update(uint32 diff)
sMapMgr->Update(diff);
}
+ {
+ TC_METRIC_TIMER("world_update_time", TC_METRIC_TAG("type", "Terrain data cleanup"));
+ sTerrainMgr.Update(diff);
+ }
+
if (sWorld->getBoolConfig(CONFIG_AUTOBROADCAST))
{
if (m_timers[WUPDATE_AUTOBROADCAST].Passed())