Esempio n. 1
0
        // Methods
        public StartGame(byte[] data) : base(data)
        {
            this.flags = (StartGameFlags)BitConverter.ToUInt32(data, 3);
            this.name  = ByteConverter.GetNullString(data, 0x17);
            if ((this.flags & StartGameFlags.Private) == StartGameFlags.Private)
            {
                this.password = ByteConverter.GetNullString(data, 0x18 + this.name.Length);
            }
            int offset = (0x19 + this.name.Length) + ((this.password == null) ? 0 : this.password.Length);

            if (data.Length > (offset + 1))
            {
                this.statString = ByteConverter.GetNullString(data, offset);
            }
        }
Esempio n. 2
0
 // Methods
 public StartGame(byte[] data)
     : base(data)
 {
     this.flags = (StartGameFlags) BitConverter.ToUInt32(data, 3);
     this.name = ByteConverter.GetNullString(data, 0x17);
     if ((this.flags & StartGameFlags.Private) == StartGameFlags.Private)
     {
     this.password = ByteConverter.GetNullString(data, 0x18 + this.name.Length);
     }
     int offset = (0x19 + this.name.Length) + ((this.password == null) ? 0 : this.password.Length);
     if (data.Length > (offset + 1))
     {
     this.statString = ByteConverter.GetNullString(data, offset);
     }
 }