public static RevealResponse FromBytes(byte[] bytes) { VRage.ByteStream stream = new VRage.ByteStream(bytes, bytes.Length); RevealResponse response = new RevealResponse(); response.LoadFromByteStream(stream); response.EntityId = stream.getLong(); response.Success = stream.getBoolean(); return response; }
public static RevealResponse FromBytes(byte[] bytes) { VRage.ByteStream stream = new VRage.ByteStream(bytes, bytes.Length); RevealResponse response = new RevealResponse(); response.LoadFromByteStream(stream); response.EntityId = stream.getLong(); response.Success = stream.getBoolean(); return(response); }
private void ReceiveRevealRequest(byte[] body, ulong senderId) { Log.Trace("Receiving Reveal Request", "ReceiveRevealRequest"); RevealRequest request = RevealRequest.FromBytes(body); bool success = Session.Manager.QueueReveal(request.EntityId); RevealResponse response = new RevealResponse() { EntityId = request.EntityId, Success = success }; Log.Trace("Sending response success ? " + response.Success, "ReceiveRevealRequest"); response.SendToPlayer(senderId); }