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

            proto.build(data);
            return(proto);
        }
Exemple #2
0
 public void addClub(OP_CLUB value)
 {
     if (!this.hasClub())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 1);
     }
     this.club.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.hasClub())
            {
                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.club.Add(OP_CLUB.decode(bytes));
                }
            }
        }