Core/Maps: Move terrain data handling out of Map class
Port From (https://github.com/TrinityCore/TrinityCore/commit/16a06346aea16ffd6ee84081cedfdb0c75ac0b38)
This commit is contained in:
@@ -67,6 +67,7 @@ public static class Global
|
||||
public static ArenaTeamManager ArenaTeamMgr { get { return ArenaTeamManager.Instance; } }
|
||||
|
||||
//Maps System
|
||||
public static TerrainManager TerrainMgr { get { return TerrainManager.Instance; } }
|
||||
public static MapManager MapMgr { get { return MapManager.Instance; } }
|
||||
public static MMapManager MMapMgr { get { return MMapManager.Instance; } }
|
||||
public static VMapManager VMapMgr { get { return VMapManager.Instance; } }
|
||||
|
||||
@@ -804,7 +804,7 @@ namespace Game
|
||||
uint MapId = location.GetMapId();
|
||||
|
||||
// search for zone associated closest graveyard
|
||||
uint zoneId = Global.MapMgr.GetZoneId(conditionObject ? conditionObject.GetPhaseShift() : PhasingHandler.EmptyPhaseShift, MapId, x, y, z);
|
||||
uint zoneId = Global.TerrainMgr.GetZoneId(conditionObject ? conditionObject.GetPhaseShift() : PhasingHandler.EmptyPhaseShift, MapId, x, y, z);
|
||||
if (zoneId == 0)
|
||||
{
|
||||
if (z > -500)
|
||||
@@ -3647,7 +3647,7 @@ namespace Game
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.CalculateCreatureZoneAreaData))
|
||||
{
|
||||
PhasingHandler.InitDbVisibleMapId(phaseShift, data.terrainSwapMap);
|
||||
Global.MapMgr.GetZoneAndAreaId(phaseShift, out uint zoneId, out uint areaId, data.MapId, data.SpawnPoint);
|
||||
Global.TerrainMgr.GetZoneAndAreaId(phaseShift, out uint zoneId, out uint areaId, data.MapId, data.SpawnPoint);
|
||||
|
||||
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.UPD_CREATURE_ZONE_AREA_DATA);
|
||||
stmt.AddValue(0, zoneId);
|
||||
@@ -4440,7 +4440,7 @@ namespace Game
|
||||
if (WorldConfig.GetBoolValue(WorldCfg.CalculateGameobjectZoneAreaData))
|
||||
{
|
||||
PhasingHandler.InitDbVisibleMapId(phaseShift, data.terrainSwapMap);
|
||||
Global.MapMgr.GetZoneAndAreaId(phaseShift, out uint zoneId, out uint areaId, data.MapId, data.SpawnPoint);
|
||||
Global.TerrainMgr.GetZoneAndAreaId(phaseShift, out uint zoneId, out uint areaId, data.MapId, data.SpawnPoint);
|
||||
|
||||
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.UPD_GAMEOBJECT_ZONE_AREA_DATA);
|
||||
stmt.AddValue(0, zoneId);
|
||||
|
||||
Reference in New Issue
Block a user