public static void HandleLoadAllLandblocks(Session session, params string[] parameters) { session.Network.EnqueueSend(new GameMessageSystemChat("Loading landblocks... This will likely crash the server...", ChatMessageType.System)); //Task.Run(() => // Using Task.Run() seems to halt around the 0x01E# block range. { for (int x = 0; x <= 0xFE; x++) { for (int y = 0; y <= 0xFE; y++) { LandblockManager.ForceLoadLandBlock(new LandblockId((byte)x, (byte)y)); } } }//); }
public static void LoadLandBlock(Session session, params string[] parameters) { try { if (!uint.TryParse(parameters[0], out var rawid)) { return; } LandblockManager.ForceLoadLandBlock(new LandblockId((rawid) << 16)); } catch { Console.WriteLine("Invalid LandblockId"); } }
public static void LoadLandblock(ushort block) { LandblockManager.ForceLoadLandBlock(new LandblockId(((uint)block) << 16)); }