Core/MMaps: Fixed pathing for objects that have terrain swaps active

Port From (https://github.com/TrinityCore/TrinityCore/commit/86725ed9267803506d8a5cab04c2c5641a234dd9)
This commit is contained in:
hondacrx
2023-09-13 20:46:16 -04:00
parent 3052b1dc23
commit f7ae161e3d
5 changed files with 50 additions and 24 deletions
@@ -27,8 +27,8 @@ namespace Game.Movement
uint mapId = PhasingHandler.GetTerrainMapId(_source.GetPhaseShift(), _source.GetMapId(), _source.GetMap().GetTerrain(), _source.GetPositionX(), _source.GetPositionY());
if (Global.DisableMgr.IsPathfindingEnabled(_source.GetMapId()))
{
_navMesh = Global.MMapMgr.GetNavMesh(mapId);
_navMeshQuery = Global.MMapMgr.GetNavMeshQuery(mapId, _source.GetInstanceId());
_navMeshQuery = Global.MMapMgr.GetNavMeshQuery(mapId, _source.GetMapId(), _source.GetInstanceId());
_navMesh = _navMeshQuery?.getAttachedNavMesh() ?? Global.MMapMgr.GetNavMesh(mapId);
}
CreateFilter();
}