Exemple #1
0
        public static SEAT_INFO decode(byte[] data)
        {
            SEAT_INFO proto = newBuilder();

            proto.build(data);
            return(proto);
        }
Exemple #2
0
 public void addSeatinfo(SEAT_INFO value)
 {
     if (!this.hasSeatinfo())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 32);
     }
     this.seatinfo.Add(value);
 }
Exemple #3
0
        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.hasSettingId())
            {
                this.settingId = buf.getInt();
            }

            if (this.hasRoomId())
            {
                this.roomId = buf.getInt();
            }

            if (this.hasLoop())
            {
                this.loop = buf.getInt();
            }

            if (this.hasMaxLoop())
            {
                this.maxLoop = buf.getInt();
            }

            if (this.hasOwnerId())
            {
                this.ownerId = buf.getInt();
            }

            if (this.hasSeatinfo())
            {
                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.seatinfo.Add(SEAT_INFO.decode(bytes));
                }
            }

            if (this.hasRoomStatus())
            {
                this.room_status = (ROOM_STATUS)buf.get();
            }
        }