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.hasZjhEnumRoomresult())
            {
                this.zjh_enum_roomresult = (ENUM_ROOMRESULT)buf.get();
            }

            if (this.hasZjhCommon())
            {
                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.zjh_common.Add(SEAT_COMMON.decode(bytes));
                }
            }
        }
Exemple #2
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.hasPos())
            {
                this.pos = buf.getInt();
            }

            if (this.hasZjhCommon())
            {
                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.zjh_common.Add(SEAT_COMMON.decode(bytes));
                }
            }

            if (this.hasRound())
            {
                this.round = buf.getInt();
            }
        }
Exemple #3
0
        public static SEAT_COMMON decode(byte[] data)
        {
            SEAT_COMMON proto = newBuilder();

            proto.build(data);
            return(proto);
        }
Exemple #4
0
 public void addZjhCommon(SEAT_COMMON value)
 {
     if (!this.hasZjhCommon())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 1);
     }
     this.zjh_common.Add(value);
 }