public void build(byte[] data) { ByteBuffer buf = ByteBuffer.wrap(data); for (int i = 0; i < this.__flag.Length; i++) { this.__flag[i] = buf.get(); } if (this.hasMaxLoop()) { this.maxLoop = buf.getInt(); } if (this.hasLoop()) { this.loop = buf.getInt(); } if (this.hasRoomId()) { this.roomId = buf.getInt(); } if (this.hasResult()) { int size = buf.getShort(); for (int i = 0; i < size; i++) { byte[] bytes = new byte[buf.getInt()]; buf.get(ref bytes, 0, bytes.Length); this.result.Add(OP_SEAT_RESULT.decode(bytes)); } } }
public static OP_SEAT_RESULT decode(byte[] data) { OP_SEAT_RESULT proto = newBuilder(); proto.build(data); return(proto); }
public void addResult(OP_SEAT_RESULT value) { if (!this.hasResult()) { this.__flag[0] = (byte)(this.__flag[0] | 8); } this.result.Add(value); }