diff options
22 files changed, 90 insertions, 90 deletions
diff --git a/src/common/Collision/DynamicTree.cpp b/src/common/Collision/DynamicTree.cpp index 7566edb473d..85dc9d52618 100644 --- a/src/common/Collision/DynamicTree.cpp +++ b/src/common/Collision/DynamicTree.cpp @@ -23,7 +23,7 @@ #include "RegularGrid.h" #include "Timer.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "WorldModel.h" #include <G3D/AABox.h> #include <G3D/Ray.h> diff --git a/src/common/Collision/Management/VMapFactory.cpp b/src/common/Collision/Management/VMapFactory.cpp index 191f33a7663..90c611a78c2 100644 --- a/src/common/Collision/Management/VMapFactory.cpp +++ b/src/common/Collision/Management/VMapFactory.cpp @@ -16,18 +16,18 @@ */ #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" namespace VMAP { - VMapManager2* gVMapManager = nullptr; + VMapManager* gVMapManager = nullptr; //=============================================== // just return the instance - VMapManager2* VMapFactory::createOrGetVMapManager() + VMapManager* VMapFactory::createOrGetVMapManager() { if (gVMapManager == nullptr) - gVMapManager= new VMapManager2(); + gVMapManager= new VMapManager(); return gVMapManager; } diff --git a/src/common/Collision/Management/VMapFactory.h b/src/common/Collision/Management/VMapFactory.h index 29583348ee8..bb401888beb 100644 --- a/src/common/Collision/Management/VMapFactory.h +++ b/src/common/Collision/Management/VMapFactory.h @@ -26,12 +26,12 @@ This is the access point to the VMapManager. namespace VMAP { - class VMapManager2; + class VMapManager; class TC_COMMON_API VMapFactory { public: - static VMapManager2* createOrGetVMapManager(); + static VMapManager* createOrGetVMapManager(); static void clear(); }; diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager.cpp index b4f01411543..ddf8c70be71 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager.cpp @@ -15,7 +15,7 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "VMapManager2.h" +#include "VMapManager.h" #include "Errors.h" #include "Log.h" #include "MapTree.h" @@ -29,7 +29,7 @@ namespace VMAP class ManagedModel { public: - explicit ManagedModel(VMapManager2& mgr, std::string const& name) : _mgr(mgr), _name(name) { } + explicit ManagedModel(VMapManager& mgr, std::string const& name) : _mgr(mgr), _name(name) { } ManagedModel(ManagedModel const&) = delete; ManagedModel(ManagedModel&&) = delete; @@ -45,8 +45,8 @@ namespace VMAP WorldModel Model; private: - VMapManager2& _mgr; - std::string const& _name; // valid only while model is held in VMapManager2::iLoadedModelFiles + VMapManager& _mgr; + std::string const& _name; // valid only while model is held in VMapManager::iLoadedModelFiles }; bool readChunk(FILE* rf, char* dest, const char* compare, uint32 len) @@ -55,7 +55,7 @@ namespace VMAP return memcmp(dest, compare, len) == 0; } - VMapManager2::VMapManager2() : + VMapManager::VMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true), thread_safe_environment(true), @@ -64,9 +64,9 @@ namespace VMAP { } - VMapManager2::~VMapManager2() = default; + VMapManager::~VMapManager() = default; - InstanceTreeMap::const_iterator VMapManager2::GetMapTree(uint32 mapId) const + InstanceTreeMap::const_iterator VMapManager::GetMapTree(uint32 mapId) const { // return the iterator if found or end() if not found/NULL auto itr = iInstanceMapTrees.find(mapId); @@ -76,9 +76,9 @@ namespace VMAP return itr; } - void VMapManager2::InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData) + void VMapManager::InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData) { - // the caller must pass the list of all mapIds that will be used in the VMapManager2 lifetime + // the caller must pass the list of all mapIds that will be used in the VMapManager lifetime for (auto const& [mapId, childMapIds] : mapData) { iInstanceMapTrees[mapId] = nullptr; @@ -89,7 +89,7 @@ namespace VMAP thread_safe_environment = false; } - void VMapManager2::InitializeThreadUnsafe(uint32 mapId, int32 parentMapId) + void VMapManager::InitializeThreadUnsafe(uint32 mapId, int32 parentMapId) { iInstanceMapTrees[mapId] = nullptr; if (parentMapId >= 0) @@ -107,17 +107,17 @@ namespace VMAP return pos; } - std::string VMapManager2::getMapFileName(uint32 mapId) + std::string VMapManager::getMapFileName(uint32 mapId) { return Trinity::StringFormat("{:04}/{:04}.vmtree", mapId, mapId); } - std::string VMapManager2::getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension) + std::string VMapManager::getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension) { return Trinity::StringFormat("{:04}/{:04}_{:02}_{:02}.{}", mapID, mapID, tileY, tileX, extension); } - LoadResult VMapManager2::loadMap(std::string const& basePath, uint32 mapId, uint32 x, uint32 y) + LoadResult VMapManager::loadMap(std::string const& basePath, uint32 mapId, uint32 x, uint32 y) { if (!isMapLoadingEnabled()) return LoadResult::DisabledInConfig; @@ -128,7 +128,7 @@ namespace VMAP if (thread_safe_environment) instanceTree = iInstanceMapTrees.insert(InstanceTreeMap::value_type(mapId, nullptr)).first; else - ABORT_MSG("Invalid mapId %u tile [%u, %u] passed to VMapManager2 after startup in thread unsafe environment", + ABORT_MSG("Invalid mapId %u tile [%u, %u] passed to VMapManager after startup in thread unsafe environment", mapId, x, y); } @@ -146,7 +146,7 @@ namespace VMAP return instanceTree->second->LoadMapTile(x, y, this); } - void VMapManager2::unloadMap(uint32 mapId, uint32 x, uint32 y) + void VMapManager::unloadMap(uint32 mapId, uint32 x, uint32 y) { auto instanceTree = iInstanceMapTrees.find(mapId); if (instanceTree != iInstanceMapTrees.end() && instanceTree->second) @@ -157,7 +157,7 @@ namespace VMAP } } - void VMapManager2::unloadMap(uint32 mapId) + void VMapManager::unloadMap(uint32 mapId) { auto instanceTree = iInstanceMapTrees.find(mapId); if (instanceTree != iInstanceMapTrees.end() && instanceTree->second) @@ -168,7 +168,7 @@ namespace VMAP } } - bool VMapManager2::isInLineOfSight(uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) + bool VMapManager::isInLineOfSight(uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) { if (!isLineOfSightCalcEnabled() || IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LOS)) return true; @@ -189,7 +189,7 @@ namespace VMAP get the hit position and return true if we hit something otherwise the result pos will be the dest pos */ - bool VMapManager2::getObjectHitPos(uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float modifyDist) + bool VMapManager::getObjectHitPos(uint32 mapId, float x1, float y1, float z1, float x2, float y2, float z2, float& rx, float &ry, float& rz, float modifyDist) { if (isLineOfSightCalcEnabled() && !IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LOS)) { @@ -219,7 +219,7 @@ namespace VMAP get height or INVALID_HEIGHT if no height available */ - float VMapManager2::getHeight(uint32 mapId, float x, float y, float z, float maxSearchDist) + float VMapManager::getHeight(uint32 mapId, float x, float y, float z, float maxSearchDist) { if (isHeightCalcEnabled() && !IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_HEIGHT)) { @@ -238,7 +238,7 @@ namespace VMAP return VMAP_INVALID_HEIGHT_VALUE; } - bool VMapManager2::getAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const + bool VMapManager::getAreaAndLiquidData(uint32 mapId, float x, float y, float z, Optional<uint8> reqLiquidType, AreaAndLiquidData& data) const { InstanceTreeMap::const_iterator instanceTree = GetMapTree(mapId); if (instanceTree != iInstanceMapTrees.end()) @@ -267,7 +267,7 @@ namespace VMAP return false; } - std::shared_ptr<WorldModel> VMapManager2::acquireModelInstance(std::string const& basepath, std::string const& filename) + std::shared_ptr<WorldModel> VMapManager::acquireModelInstance(std::string const& basepath, std::string const& filename) { std::shared_ptr<ManagedModel> worldmodel; // this is intentionally declared before lock so that it is destroyed after it to prevent deadlocks in releaseModelInstance @@ -282,34 +282,34 @@ namespace VMAP worldmodel = std::make_shared<ManagedModel>(*this, key); if (!worldmodel->Model.readFile(basepath + filename + ".vmo")) { - TC_LOG_ERROR("misc", "VMapManager2: could not load '{}{}.vmo'", basepath, filename); + TC_LOG_ERROR("misc", "VMapManager: could not load '{}{}.vmo'", basepath, filename); return nullptr; } - TC_LOG_DEBUG("maps", "VMapManager2: loading file '{}{}'", basepath, filename); + TC_LOG_DEBUG("maps", "VMapManager: loading file '{}{}'", basepath, filename); model = worldmodel; return std::shared_ptr<WorldModel>(worldmodel, &worldmodel->Model); } - void VMapManager2::releaseModelInstance(std::string const& filename) + void VMapManager::releaseModelInstance(std::string const& filename) { //! Critical section, thread safe access to iLoadedModelFiles std::lock_guard lock(LoadedModelFilesLock); - TC_LOG_DEBUG("maps", "VMapManager2: unloading file '{}'", filename); + TC_LOG_DEBUG("maps", "VMapManager: unloading file '{}'", filename); std::size_t erased = iLoadedModelFiles.erase(filename); if (!erased) - TC_LOG_ERROR("misc", "VMapManager2: trying to unload non-loaded file '{}'", filename); + TC_LOG_ERROR("misc", "VMapManager: trying to unload non-loaded file '{}'", filename); } - LoadResult VMapManager2::existsMap(std::string const& basePath, uint32 mapId, uint32 x, uint32 y) + LoadResult VMapManager::existsMap(std::string const& basePath, uint32 mapId, uint32 x, uint32 y) { return StaticMapTree::CanLoadMap(basePath, mapId, x, y, this); } - std::span<ModelInstance const> VMapManager2::getModelsOnMap(uint32 mapId) const + std::span<ModelInstance const> VMapManager::getModelsOnMap(uint32 mapId) const { InstanceTreeMap::const_iterator mapTree = GetMapTree(mapId); if (mapTree != iInstanceMapTrees.end()) @@ -318,7 +318,7 @@ namespace VMAP return {}; } - int32 VMapManager2::getParentMapId(uint32 mapId) const + int32 VMapManager::getParentMapId(uint32 mapId) const { auto itr = iParentMapData.find(mapId); if (itr != iParentMapData.end()) diff --git a/src/common/Collision/Management/VMapManager2.h b/src/common/Collision/Management/VMapManager.h index 84aac14f76d..ae91d3db50e 100644 --- a/src/common/Collision/Management/VMapManager2.h +++ b/src/common/Collision/Management/VMapManager.h @@ -96,7 +96,7 @@ namespace VMAP Optional<LiquidInfo> liquidInfo; }; - class TC_COMMON_API VMapManager2 + class TC_COMMON_API VMapManager { protected: bool iEnableLineOfSightCalc; @@ -116,15 +116,15 @@ namespace VMAP static std::string getMapFileName(uint32 mapId); static std::string getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension); - VMapManager2(); + VMapManager(); - VMapManager2(VMapManager2 const&) = delete; - VMapManager2(VMapManager2&&) = delete; + VMapManager(VMapManager const&) = delete; + VMapManager(VMapManager&&) = delete; - VMapManager2& operator=(VMapManager2 const&) = delete; - VMapManager2& operator=(VMapManager2&&) = delete; + VMapManager& operator=(VMapManager const&) = delete; + VMapManager& operator=(VMapManager&&) = delete; - ~VMapManager2(); + ~VMapManager(); void InitializeThreadUnsafe(std::unordered_map<uint32, std::vector<uint32>> const& mapData); void InitializeThreadUnsafe(uint32 mapId, int32 parentMapId); diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index 9438ba6b219..086ef975f1f 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -22,7 +22,7 @@ #include "Metric.h" #include "ModelInstance.h" #include "VMapDefinitions.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "WorldModel.h" #include <limits> #include <string> @@ -199,19 +199,19 @@ namespace VMAP explicit operator bool() const { return TileFile && SpawnIndicesFile; } }; - TileFileOpenResult OpenMapTileFile(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm) + TileFileOpenResult OpenMapTileFile(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager* vm) { TileFileOpenResult result; - result.Name = basePath + VMapManager2::getTileFileName(mapID, tileX, tileY, "vmtile"); + result.Name = basePath + VMapManager::getTileFileName(mapID, tileX, tileY, "vmtile"); result.TileFile.reset(fopen(result.Name.c_str(), "rb")); - result.SpawnIndicesFile.reset(fopen((basePath + VMapManager2::getTileFileName(mapID, tileX, tileY, "vmtileidx")).c_str(), "rb")); + result.SpawnIndicesFile.reset(fopen((basePath + VMapManager::getTileFileName(mapID, tileX, tileY, "vmtileidx")).c_str(), "rb")); result.UsedMapId = mapID; if (!result.TileFile) { int32 parentMapId = vm->getParentMapId(mapID); while (parentMapId != -1) { - result.Name = basePath + VMapManager2::getTileFileName(parentMapId, tileX, tileY, "vmtile"); + result.Name = basePath + VMapManager::getTileFileName(parentMapId, tileX, tileY, "vmtile"); result.TileFile.reset(fopen(result.Name.c_str(), "rb")); result.UsedMapId = parentMapId; if (result.TileFile) @@ -225,13 +225,13 @@ namespace VMAP } //========================================================= - LoadResult StaticMapTree::CanLoadMap(std::string const& vmapPath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm) + LoadResult StaticMapTree::CanLoadMap(std::string const& vmapPath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager* vm) { std::string basePath = vmapPath; if (!basePath.empty() && basePath.back() != '/' && basePath.back() != '\\') basePath.push_back('/'); - std::string fullname = basePath + VMapManager2::getMapFileName(mapID); + std::string fullname = basePath + VMapManager::getMapFileName(mapID); auto rf = Trinity::make_unique_ptr_with_deleter<&::fclose>(fopen(fullname.c_str(), "rb")); if (!rf) @@ -285,7 +285,7 @@ namespace VMAP //========================================================= - LoadResult StaticMapTree::LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm) + LoadResult StaticMapTree::LoadMapTile(uint32 tileX, uint32 tileY, VMapManager* vm) { if (iTreeValues.empty()) { @@ -369,7 +369,7 @@ namespace VMAP //========================================================= - void StaticMapTree::UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm) + void StaticMapTree::UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager* vm) { uint32 tileID = packTileID(tileX, tileY); loadedTileMap::iterator tile = iLoadedTiles.find(tileID); diff --git a/src/common/Collision/Maps/MapTree.h b/src/common/Collision/Maps/MapTree.h index 641708fa2ad..049b1c416b5 100644 --- a/src/common/Collision/Maps/MapTree.h +++ b/src/common/Collision/Maps/MapTree.h @@ -27,7 +27,7 @@ namespace VMAP { class ModelInstance; class GroupModel; - class VMapManager2; + class VMapManager; enum class LoadResult : uint8; enum class ModelIgnoreFlags : uint32; @@ -66,7 +66,7 @@ namespace VMAP public: static uint32 packTileID(uint32 tileX, uint32 tileY) { return tileX << 16 | tileY; } static void unpackTileID(uint32 ID, uint32& tileX, uint32& tileY) { tileX = ID >> 16; tileY = ID & 0xFF; } - static LoadResult CanLoadMap(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager2* vm); + static LoadResult CanLoadMap(std::string const& basePath, uint32 mapID, uint32 tileX, uint32 tileY, VMapManager* vm); StaticMapTree(uint32 mapID, std::string const& basePath); ~StaticMapTree(); @@ -78,8 +78,8 @@ namespace VMAP LoadResult InitMap(std::string const& fname); void UnloadMap(); - LoadResult LoadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm); - void UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager2* vm); + LoadResult LoadMapTile(uint32 tileX, uint32 tileY, VMapManager* vm); + void UnloadMapTile(uint32 tileX, uint32 tileY, VMapManager* vm); uint32 numLoadedTiles() const { return uint32(iLoadedTiles.size()); } std::span<ModelInstance const> getModelInstances() const; diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index 5d8712561f6..a1b583d14cc 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -16,7 +16,7 @@ */ #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "VMapDefinitions.h" #include "WorldModel.h" #include "GameObjectModel.h" diff --git a/src/common/Collision/VMapDefinitions.h b/src/common/Collision/VMapDefinitions.h index cb08107bc98..b5369eeb0a8 100644 --- a/src/common/Collision/VMapDefinitions.h +++ b/src/common/Collision/VMapDefinitions.h @@ -28,7 +28,7 @@ namespace VMAP const char RAW_VMAP_MAGIC[] = "VMAP04D"; // used in extracted vmap files with raw data const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree"; - // defined in VMapManager2.cpp currently... + // defined in VMapManager.cpp currently... bool readChunk(FILE* rf, char *dest, const char *compare, uint32 len); } diff --git a/src/server/game/Conditions/DisableMgr.cpp b/src/server/game/Conditions/DisableMgr.cpp index 0ef3df3ae3b..a09abd8bc50 100644 --- a/src/server/game/Conditions/DisableMgr.cpp +++ b/src/server/game/Conditions/DisableMgr.cpp @@ -26,7 +26,7 @@ #include "Player.h" #include "SpellMgr.h" #include "StringConvert.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "World.h" namespace DisableMgr diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index 0f729d06dff..aa090bc5c1b 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -52,7 +52,7 @@ #include "Util.h" #include "VMapFactory.h" #include "Vehicle.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "World.h" #include <G3D/Vector3.h> #include <sstream> diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index f6e53f377a1..1b9857defad 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -71,7 +71,7 @@ #include "Timer.h" #include "TransportMgr.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "Vehicle.h" #include "World.h" #include "advstd.h" @@ -2197,7 +2197,7 @@ void ObjectMgr::LoadCreatures() if (sWorld->getBoolConfig(CONFIG_CREATURE_CHECK_INVALID_POSITION)) { - if (VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) + if (VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) { if (vmgr->isMapLoadingEnabled() && !IsTransportMap(data.mapId)) { @@ -2553,7 +2553,7 @@ void ObjectMgr::LoadGameObjects() if (sWorld->getBoolConfig(CONFIG_GAME_OBJECT_CHECK_INVALID_POSITION)) { - if (VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) + if (VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) { if (vmgr->isMapLoadingEnabled() && !IsTransportMap(data.mapId)) { diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index e9e4748b440..3a8e3c4cc56 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -52,7 +52,7 @@ #include "TerrainMgr.h" #include "Transport.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "Vehicle.h" #include "Vignette.h" #include "VignettePackets.h" diff --git a/src/server/game/Maps/TerrainMgr.cpp b/src/server/game/Maps/TerrainMgr.cpp index 6bfe066994d..19dd852baca 100644 --- a/src/server/game/Maps/TerrainMgr.cpp +++ b/src/server/game/Maps/TerrainMgr.cpp @@ -28,7 +28,7 @@ #include "ScriptMgr.h" #include "Util.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "World.h" #include <G3D/g3dmath.h> @@ -109,12 +109,12 @@ bool TerrainInfo::ExistMap(uint32 mapid, int32 gx, int32 gy, bool log /*= true*/ bool TerrainInfo::ExistVMap(uint32 mapid, int32 gx, int32 gy) { - if (VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) + if (VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager()) { if (vmgr->isMapLoadingEnabled()) { VMAP::LoadResult result = vmgr->existsMap(sWorld->GetDataPath() + "vmaps", mapid, gx, gy); - std::string name = VMAP::VMapManager2::getDirFileName(mapid, gx, gy); + std::string name = VMAP::VMapManager::getDirFileName(mapid, gx, gy); switch (result) { case VMAP::LoadResult::Success: @@ -334,7 +334,7 @@ static bool IsInWMOInterior(uint32 mogpFlags) void TerrainInfo::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, uint32 mapId, float x, float y, float z, PositionFullTerrainStatus& data, Optional<map_liquidHeaderTypeFlags> reqLiquidType, float collisionHeight, DynamicMapTree const* dynamicMapTree) { - VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); VMAP::AreaAndLiquidData vmapData; VMAP::AreaAndLiquidData dynData; VMAP::AreaAndLiquidData* wmoData = nullptr; @@ -484,7 +484,7 @@ void TerrainInfo::GetFullTerrainStatusForPosition(PhaseShift const& phaseShift, ZLiquidStatus TerrainInfo::GetLiquidStatus(PhaseShift const& phaseShift, uint32 mapId, float x, float y, float z, Optional<map_liquidHeaderTypeFlags> ReqLiquidType, LiquidData* data, float collisionHeight) { ZLiquidStatus result = LIQUID_MAP_NO_WATER; - VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); VMAP::AreaAndLiquidData vmapData; bool useGridLiquid = true; uint32 terrainMapId = PhasingHandler::GetTerrainMapId(phaseShift, mapId, this, x, y); @@ -585,7 +585,7 @@ bool TerrainInfo::GetAreaInfo(PhaseShift const& phaseShift, uint32 mapId, float { float check_z = z; uint32 terrainMapId = PhasingHandler::GetTerrainMapId(phaseShift, mapId, this, x, y); - VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); VMAP::AreaAndLiquidData vdata; VMAP::AreaAndLiquidData ddata; @@ -703,7 +703,7 @@ float TerrainInfo::GetStaticHeight(PhaseShift const& phaseShift, uint32 mapId, f float vmapHeight = VMAP_INVALID_HEIGHT_VALUE; if (checkVMap) { - VMAP::VMapManager2* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::VMapManager* vmgr = VMAP::VMapFactory::createOrGetVMapManager(); if (vmgr->isHeightCalcEnabled()) vmapHeight = vmgr->getHeight(terrainMapId, x, y, z, maxSearchDist); } diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c4260860fb3..3904b81a472 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -65,7 +65,7 @@ #include "Util.h" #include "VMapFactory.h" #include "Vehicle.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "World.h" #include "WorldSession.h" #include <numeric> diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index d4436a76e96..7bb15be57ca 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -99,7 +99,7 @@ #include "Unit.h" #include "UpdateTime.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "WardenCheckMgr.h" #include "WaypointManager.h" #include "WeatherMgr.h" @@ -1247,7 +1247,7 @@ bool World::SetInitialWorldSettings() dtAllocSetCustom(dtCustomAlloc, dtCustomFree); ///- Initialize VMapManager function pointers (to untangle game/collision circular deps) - VMAP::VMapManager2* vmmgr2 = VMAP::VMapFactory::createOrGetVMapManager(); + VMAP::VMapManager* vmmgr2 = VMAP::VMapFactory::createOrGetVMapManager(); vmmgr2->GetLiquidFlagsPtr = &DB2Manager::GetLiquidFlags; vmmgr2->IsVMAPDisabledForPtr = &DisableMgr::IsVMAPDisabledFor; diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index a6321d49d6f..843c46d98b3 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -38,7 +38,7 @@ EndScriptData */ #include "UpdateTime.h" #include "Util.h" #include "VMapFactory.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include "World.h" #include "WorldSession.h" #include <boost/filesystem/directory.hpp> diff --git a/src/tools/mmaps_generator/PathCommon.h b/src/tools/mmaps_generator/PathCommon.h index b7c05fe1541..b0761cc2d9a 100644 --- a/src/tools/mmaps_generator/PathCommon.h +++ b/src/tools/mmaps_generator/PathCommon.h @@ -38,7 +38,7 @@ namespace VMAP { - class VMapManager2; + class VMapManager; } namespace MMAP @@ -141,7 +141,7 @@ namespace MMAP namespace VMapFactory { - std::unique_ptr<VMAP::VMapManager2> CreateVMapManager(uint32 mapId); + std::unique_ptr<VMAP::VMapManager> CreateVMapManager(uint32 mapId); } } diff --git a/src/tools/mmaps_generator/PathGenerator.cpp b/src/tools/mmaps_generator/PathGenerator.cpp index 1e98b19a852..0830c977886 100644 --- a/src/tools/mmaps_generator/PathGenerator.cpp +++ b/src/tools/mmaps_generator/PathGenerator.cpp @@ -25,7 +25,7 @@ #include "PathCommon.h" #include "Timer.h" #include "Util.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include <boost/filesystem/operations.hpp> #include <unordered_map> #include <vector> @@ -46,9 +46,9 @@ namespace MMAP namespace VMapFactory { - std::unique_ptr<VMAP::VMapManager2> CreateVMapManager(uint32 mapId) + std::unique_ptr<VMAP::VMapManager> CreateVMapManager(uint32 mapId) { - std::unique_ptr<VMAP::VMapManager2> vmgr = std::make_unique<VMAP::VMapManager2>(); + std::unique_ptr<VMAP::VMapManager> vmgr = std::make_unique<VMAP::VMapManager>(); do { diff --git a/src/tools/mmaps_generator/TerrainBuilder.cpp b/src/tools/mmaps_generator/TerrainBuilder.cpp index 6894021ea90..ed417ad51e4 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.cpp +++ b/src/tools/mmaps_generator/TerrainBuilder.cpp @@ -23,7 +23,7 @@ #include "ModelInstance.h" #include "StringFormat.h" #include "Util.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include <map> namespace MMAP @@ -64,7 +64,7 @@ namespace MMAP } /**************************************************************************/ - void TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager) + void TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager) { if (loadMap(mapID, tileX, tileY, meshData, vmapManager, ENTIRE)) { @@ -76,7 +76,7 @@ namespace MMAP } /**************************************************************************/ - bool TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager, Spot portion) + bool TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager, Spot portion) { std::string mapFileName = Trinity::StringFormat("maps/{:04}_{:02}_{:02}.map", mapID, tileY, tileX); @@ -579,7 +579,7 @@ namespace MMAP } /**************************************************************************/ - bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager) + bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager) { VMAP::LoadResult result = vmapManager->loadMap("vmaps", mapID, tileX, tileY); bool retval = false; diff --git a/src/tools/mmaps_generator/TerrainBuilder.h b/src/tools/mmaps_generator/TerrainBuilder.h index fff061d4618..7a7cc6ba918 100644 --- a/src/tools/mmaps_generator/TerrainBuilder.h +++ b/src/tools/mmaps_generator/TerrainBuilder.h @@ -25,7 +25,7 @@ namespace VMAP { -class VMapManager2; +class VMapManager; } enum class map_liquidHeaderTypeFlags : uint8; @@ -97,8 +97,8 @@ namespace MMAP public: explicit TerrainBuilder(bool skipLiquid); - void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager); - bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager); + void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager); + bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager); void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, std::vector<OffMeshData> const& offMeshConnections); bool usesLiquids() const { return !m_skipLiquid; } @@ -112,7 +112,7 @@ namespace MMAP static void cleanVertices(G3D::Array<float>& verts, G3D::Array<int>& tris); private: /// Loads a portion of a map's terrain - bool loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager2* vmapManager, Spot portion); + bool loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData& meshData, VMAP::VMapManager* vmapManager, Spot portion); /// Sets loop variables for selecting only certain parts of a map's terrain void getLoopVars(Spot portion, int& loopStart, int& loopEnd, int& loopInc); diff --git a/src/tools/mmaps_generator/TileBuilder.cpp b/src/tools/mmaps_generator/TileBuilder.cpp index 7b0a7bef00f..bdd25b7ef04 100644 --- a/src/tools/mmaps_generator/TileBuilder.cpp +++ b/src/tools/mmaps_generator/TileBuilder.cpp @@ -21,7 +21,7 @@ #include "MMapDefines.h" #include "PathCommon.h" #include "StringFormat.h" -#include "VMapManager2.h" +#include "VMapManager.h" #include <DetourNavMeshBuilder.h> namespace @@ -95,7 +95,7 @@ namespace MMAP MeshData meshData; - std::unique_ptr<VMAP::VMapManager2> vmapManager = VMapFactory::CreateVMapManager(mapID); + std::unique_ptr<VMAP::VMapManager> vmapManager = VMapFactory::CreateVMapManager(mapID); // get heightmap data m_terrainBuilder.loadMap(mapID, tileX, tileY, meshData, vmapManager.get()); |
