public override string ToString() { RdlTagCollection tags = new RdlTagCollection(); tags.AddRange(this.ToRdl()); return(tags.ToString()); }
public static MapChunk GetMapChunk(string mapName, int startX, int startY, bool includeActors) { RdlTagCollection tags = new RdlTagCollection(); List <Place> places = Game.Server.World.Map.GetMap(mapName, startX, startY, Game.Server.World.Map.DefaultWidth, Game.Server.World.Map.DefaultHeight); if (places.Count > 0) { for (int i = 0; i < places.Count; i++) { tags.AddRange(places[i].ToRdl()); if (includeActors) { // Send down actors in the places as well. foreach (var actor in places[i].Children) { if (actor.ObjectType != ObjectType.Player) { tags.AddRange(actor.ToRdl()); } } } } } return(new MapChunk { MapName = mapName, StartX = startX, StartY = startY, Tags = tags.ToString() }); }
public string Process(string data) { var response = String.Empty; var client = Game.Server.ProcessCommands(this, RdlCommandGroup.FromString(data), Guid.NewGuid(), OperationContext.Current.Channel.LocalAddress.ToString()); if (client != null) { var tags = new RdlTagCollection(); RdlTag tag; while (client.Context.Read(out tag)) { tags.Add(tag); } response = tags.ToString(); } return(response); }