Core/Maps: Move terrain data handling out of Map class

Port From (https://github.com/TrinityCore/TrinityCore/commit/16a06346aea16ffd6ee84081cedfdb0c75ac0b38)
This commit is contained in:
hondacrx
2022-07-24 16:31:00 -04:00
parent c4344fbf66
commit 3cd58e4a17
25 changed files with 1035 additions and 960 deletions
+3 -3
View File
@@ -241,13 +241,13 @@ namespace Game
if (corpseMapEntry.IsDungeon() && corpseMapEntry.CorpseMapID >= 0)
{
// if corpse map have entrance
Map entranceMap = Global.MapMgr.CreateBaseMap((uint)corpseMapEntry.CorpseMapID);
if (entranceMap != null)
TerrainInfo entranceTerrain = Global.TerrainMgr.LoadTerrain((uint)corpseMapEntry.CorpseMapID);
if (entranceTerrain != null)
{
mapID = (uint)corpseMapEntry.CorpseMapID;
x = corpseMapEntry.Corpse.X;
y = corpseMapEntry.Corpse.Y;
z = entranceMap.GetHeight(player.GetPhaseShift(), x, y, MapConst.MaxHeight);
z = entranceTerrain.GetStaticHeight(player.GetPhaseShift(), x, y, MapConst.MaxHeight);
}
}
}