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

            proto.build(data);
            return(proto);
        }
示例#2
0
 public void addSeatInfo(SEAT_INFO value)
 {
     if (!this.hasSeatInfo())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 64);
     }
     this.seatInfo.Add(value);
 }
示例#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.hasSeatInfo())
            {
                byte[] bytes = new byte[buf.getInt()];
                buf.get(ref bytes, 0, bytes.Length);
                this.seatInfo = SEAT_INFO.decode(bytes);
            }
        }
示例#4
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())
            {
                int size = buf.getShort();
                for (int i = 0; i < size; i++)
                {
                    this.settingId.Add(buf.getInt());
                }
            }

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

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

            if (this.hasDismissTime())
            {
                this.dismissTime = buf.getLong();
            }

            if (this.hasDismissMaxTime())
            {
                this.dismissMaxTime = buf.getLong();
            }

            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.hasClubId())
            {
                this.clubId = buf.getInt();
            }

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

            if (this.hasBaseScore())
            {
                this.baseScore = buf.getInt();
            }

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