private void ReceiveConcealedGridsResponse(byte[] body) { Log.Trace("Receiving Concealed Grids Response", "ReceiveConcealedGridsResponse"); ConcealedGridsResponse response = ConcealedGridsResponse.FromBytes(body); Session.ConcealedGrids = response.ConcealedGrids; String result = Session.ConcealedGrids.Count + " Concealed Grids:\n\n"; int i = 1; foreach (World.Entities.ConcealedGrid grid in Session.ConcealedGrids) { result += String.Format("{0}: \"{1}\" - Revealability: {2}\n", i, grid.DisplayName, grid.IsRevealable); i++; } Notification notice = new WindowNotification() { Text = result, BigLabel = "Garden Performance", SmallLabel = "Concealed Grids" }; notice.Raise(); }
private void ReplyToConcealedGridsRequest(byte[] body, ulong senderId) { Log.Trace("Receiving Concealed Grids Request", "ReceiveConcealedGridsRequest"); Log.Trace("Deserializing request", "ReceiveConcealedGridsRequest"); // nothing to read, but doing this anyway to test ConcealedGridsRequest request = ConcealedGridsRequest.FromBytes(body); Log.Trace("Preparing response", "ReceiveConcealedGridsRequest"); ConcealedGridsResponse response = new ConcealedGridsResponse { ConcealedGrids = Session.Manager.Concealed.ConcealedGridsList() }; Log.Trace("Sending to player", "ReceiveConcealedGridsRequest"); response.SendToPlayer(senderId); }