Core/Maps: Move terrain data handling out of Map class
Port From (https://github.com/TrinityCore/TrinityCore/commit/16a06346aea16ffd6ee84081cedfdb0c75ac0b38)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user