Core/Maps: Fixed retrieving terrain info when on child maps

Port From (https://github.com/TrinityCore/TrinityCore/commit/704142f15a51055c4fa064b1286b65d78b795e05)
This commit is contained in:
hondacrx
2023-01-06 16:38:58 -05:00
parent a16289d51e
commit 54a507e284
9 changed files with 77 additions and 74 deletions
+1 -1
View File
@@ -3680,7 +3680,7 @@ namespace Game.Entities
// Unit is flying, check for potential collision via vmaps
if (path.GetPathType().HasFlag(PathType.NotUsingPath))
{
col = Global.VMapMgr.GetObjectHitPos(PhasingHandler.GetTerrainMapId(GetPhaseShift(), GetMap().GetTerrain(), pos.posX, pos.posY),
col = Global.VMapMgr.GetObjectHitPos(PhasingHandler.GetTerrainMapId(GetPhaseShift(), GetMapId(), GetMap().GetTerrain(), pos.posX, pos.posY),
pos.posX, pos.posY, pos.posZ + halfHeight,
destx, desty, destz + halfHeight,
out destx, out desty, out destz, -0.5f);