private static void ProcessDepotCommand(byte[] data, DepotClient client) { var group = RdlCommandGroup.FromBytes(data); foreach (var cmd in group) { if (cmd.TypeName.ToUpper().Equals("MAPNAMES")) { client.Send(Depot.GetMapNames().ToBytes()); } else if (cmd.TypeName.ToUpper().Equals("MAPCHUNK")) { var mapName = cmd.GetArg <string>(0); var startX = cmd.GetArg <int>(1); var startY = cmd.GetArg <int>(2); var includeActors = cmd.GetArg <bool>(3); var result = Depot.GetMapChunk(mapName, startX, startY, includeActors).Tags; client.Send(Encoding.UTF8.GetBytes(result)); } else { client.Send(RdlTag.Empty.ToBytes()); } } }
public string GetMapNames() { return(Depot.GetMapNames().ToString()); }