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.hasRoom())
            {
                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.room.Add(OP_CLUB_ROOM.decode(bytes));
                }
            }

            if (this.hasClubId())
            {
                this.clubId = buf.getInt();
            }
        }
Exemple #2
0
        public static OP_CLUB_ROOM decode(byte[] data)
        {
            OP_CLUB_ROOM proto = newBuilder();

            proto.build(data);
            return(proto);
        }
 public void addRoom(OP_CLUB_ROOM value)
 {
     if (!this.hasRoom())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 1);
     }
     this.room.Add(value);
 }