Core/Maps: Removed MapInstanced - no longer neccessary for grid data reference counting (moved to TerrainInfo)

Port From (https://github.com/TrinityCore/TrinityCore/commit/fbe0b8efebca3bc2662b477bdf45627f9783d6c2)
This commit is contained in:
hondacrx
2022-07-24 17:50:51 -04:00
parent 3cd58e4a17
commit efd2f4cb49
13 changed files with 513 additions and 734 deletions
+14 -9
View File
@@ -575,19 +575,24 @@ namespace Game.Chat
[Command("loadcells", RBACPermissions.CommandDebug, true)]
static bool HandleDebugLoadCellsCommand(CommandHandler handler, uint? mapId, uint? tileX, uint? tileY)
{
Map map = null;
if (mapId.HasValue)
map = Global.MapMgr.FindBaseNonInstanceMap(mapId.Value);
else
{
Player player = handler.GetPlayer();
if (player != null)
{
// Fallback to player's map if no map has been specified
map = player.GetMap();
}
Global.MapMgr.DoForAllMapsWithMapId(mapId.Value, map => HandleDebugLoadCellsCommandHelper(handler, map, tileX, tileY));
return true;
}
Player player = handler.GetPlayer();
if (player != null)
{
// Fallback to player's map if no map has been specified
return HandleDebugLoadCellsCommandHelper(handler, player.GetMap(), tileX, tileY);
}
return false;
}
static bool HandleDebugLoadCellsCommandHelper(CommandHandler handler, Map map, uint? tileX, uint? tileY)
{
if (!map)
return false;