public static OP_CLUB_RECORD_PLAYER decode(byte[] data) { OP_CLUB_RECORD_PLAYER proto = newBuilder(); proto.build(data); return(proto); }
public void addPlayer(OP_CLUB_RECORD_PLAYER value) { if (!this.hasPlayer()) { this.__flag[0] = (byte)(this.__flag[0] | 16); } this.player.Add(value); }
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.hasGameId()) { this.gameId = buf.getInt(); } if (this.hasRoomId()) { this.roomId = buf.getInt(); } if (this.hasBeginTime()) { this.beginTime = buf.getLong(); } if (this.hasMaxLoop()) { this.maxLoop = buf.getInt(); } if (this.hasPlayer()) { 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.player.Add(OP_CLUB_RECORD_PLAYER.decode(bytes)); } } if (this.hasRecordId()) { this.recordId = buf.getInt(); } if (this.hasClubId()) { this.clubId = buf.getInt(); } }