aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/MapManager.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-05-24 22:34:25 +0200
committerShauren <shauren.trinity@gmail.com>2020-05-24 22:34:25 +0200
commiteba31dea27b7fdc4a49c024898ef3a01bcbc7295 (patch)
tree4be401cb2969769c92b571e1b8d04555f633693e /src/server/game/Maps/MapManager.h
parentebb6f12db811d78a538982cca9b8cc1887fc2527 (diff)
Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids * Handle child maps being entered * Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
Diffstat (limited to 'src/server/game/Maps/MapManager.h')
-rw-r--r--src/server/game/Maps/MapManager.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h
index f1bed487e19..204a81e2182 100644
--- a/src/server/game/Maps/MapManager.h
+++ b/src/server/game/Maps/MapManager.h
@@ -38,23 +38,23 @@ class TC_GAME_API MapManager
Map* CreateMap(uint32 mapId, Player* player, uint32 loginInstanceId=0);
Map* FindMap(uint32 mapId, uint32 instanceId) const;
- uint32 GetAreaId(PhaseShift const& phaseShift, uint32 mapid, float x, float y, float z) const
+ uint32 GetAreaId(PhaseShift const& phaseShift, uint32 mapid, float x, float y, float z)
{
- Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ Map* m = CreateBaseMap(mapid);
return m->GetAreaId(phaseShift, x, y, z);
}
- uint32 GetZoneId(PhaseShift const& phaseShift, uint32 mapid, float x, float y, float z) const
+ uint32 GetZoneId(PhaseShift const& phaseShift, uint32 mapid, float x, float y, float z)
{
- Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ Map* m = CreateBaseMap(mapid);
return m->GetZoneId(phaseShift, x, y, z);
}
void GetZoneAndAreaId(PhaseShift const& phaseShift, uint32& zoneid, uint32& areaid, uint32 mapid, float x, float y, float z)
{
- Map const* m = const_cast<MapManager*>(this)->CreateBaseMap(mapid);
+ Map* m = CreateBaseMap(mapid);
m->GetZoneAndAreaId(phaseShift, zoneid, areaid, x, y, z);
}
- void Initialize(void);
+ void Initialize();
void InitializeParentMapData(std::unordered_map<uint32, std::vector<uint32>> const& mapData);
void Update(uint32);