Ejemplo n.º 1
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.hasUnixtime())
            {
                this.unixtime = buf.getLong();
            }

            if (this.hasNnSeat())
            {
                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.nn_seat.Add(NN_SEAT.decode(bytes));
                }
            }
        }
Ejemplo n.º 2
0
        public static NN_SEAT decode(byte[] data)
        {
            NN_SEAT proto = newBuilder();

            proto.build(data);
            return(proto);
        }
Ejemplo n.º 3
0
 public void addNnSeat(NN_SEAT value)
 {
     if (!this.hasNnSeat())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 1);
     }
     this.nn_seat.Add(value);
 }
Ejemplo n.º 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.hasNnSeat())
            {
                byte[] bytes = new byte[buf.getInt()];
                buf.get(ref bytes, 0, bytes.Length);
                this.nn_seat = NN_SEAT.decode(bytes);
            }
        }
Ejemplo n.º 5
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.hasRoomId())
            {
                this.roomId = buf.getInt();
            }

            if (this.hasSettingId())
            {
                int size = buf.getShort();
                for (int i = 0; i < size; i++)
                {
                    this.settingId.Add(buf.getInt());
                }
            }

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

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

            if (this.hasUnixtime())
            {
                this.unixtime = buf.getLong();
            }

            if (this.hasNnSeat())
            {
                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.nn_seat.Add(NN_SEAT.decode(bytes));
                }
            }

            if (this.hasNnSeatCount())
            {
                this.nn_seatCount = buf.getInt();
            }

            if (this.hasNnRoomStatus())
            {
                this.nn_room_status = (NN_ENUM_ROOM_STATUS)buf.get();
            }

            if (this.hasPos())
            {
                this.pos = buf.getInt();
            }

            if (this.hasClubId())
            {
                this.clubId = buf.getInt();
            }
        }