Example #1
0
 // Methods
 public AdInfoRequest(byte[] data) : base(data)
 {
     this.platform  = (BattleNetPlatform)BitConverter.ToUInt32(data, 3);
     this.client    = (BattleNetClient)BitConverter.ToUInt32(data, 7);
     this.id        = BitConverter.ToUInt32(data, 11);
     this.timestamp = TimeUtils.ParseUnixTimeUtc(BitConverter.ToUInt32(data, 15));
 }
 // Methods
 public AdInfoRequest(byte[] data)
     : base(data)
 {
     this.platform = (BattleNetPlatform) BitConverter.ToUInt32(data, 3);
     this.client = (BattleNetClient) BitConverter.ToUInt32(data, 7);
     this.id = BitConverter.ToUInt32(data, 11);
     this.timestamp = TimeUtils.ParseUnixTimeUtc(BitConverter.ToUInt32(data, 15));
 }
Example #3
0
 // Methods
 public BnetConnectionRequest(byte[] data) : base(data)
 {
     this.protocol            = BitConverter.ToUInt32(data, 3);
     this.platform            = (BattleNetPlatform)BitConverter.ToUInt32(data, 7);
     this.client              = (BattleNetClient)BitConverter.ToUInt32(data, 11);
     this.version             = BitConverter.ToUInt32(data, 15);
     this.language            = BitConverter.ToUInt32(data, 0x13);
     this.localIP             = new System.Net.IPAddress((long)BitConverter.ToUInt32(data, 0x17));
     this.timeZoneBias        = BitConverter.ToUInt32(data, 0x1b);
     this.localeID            = BitConverter.ToUInt32(data, 0x1f);
     this.languageID          = BitConverter.ToUInt32(data, 0x23);
     this.countryAbbreviation = ByteConverter.GetNullString(data, 0x27);
     this.countryName         = ByteConverter.GetNullString(data, 40 + this.countryAbbreviation.Length);
 }
Example #4
0
        // Methods
        public DisplayAd(byte[] data) : base(data)
        {
            this.platform = (BattleNetPlatform)BitConverter.ToUInt32(data, 3);
            this.client   = (BattleNetClient)BitConverter.ToUInt32(data, 7);
            this.id       = BitConverter.ToUInt32(data, 11);
            if (data[15] != 0)
            {
                this.filename = ByteConverter.GetNullString(data, 15);
            }
            int index = 0x10 + ((this.filename == null) ? 0 : this.filename.Length);

            if (data[index] != 0)
            {
                this.url = ByteConverter.GetNullString(data, index);
            }
        }
 // Methods
 public DisplayAd(byte[] data)
     : base(data)
 {
     this.platform = (BattleNetPlatform) BitConverter.ToUInt32(data, 3);
     this.client = (BattleNetClient) BitConverter.ToUInt32(data, 7);
     this.id = BitConverter.ToUInt32(data, 11);
     if (data[15] != 0)
     {
     this.filename = ByteConverter.GetNullString(data, 15);
     }
     int index = 0x10 + ((this.filename == null) ? 0 : this.filename.Length);
     if (data[index] != 0)
     {
     this.url = ByteConverter.GetNullString(data, index);
     }
 }
 // Methods
 public BnetConnectionRequest(byte[] data)
     : base(data)
 {
     this.protocol = BitConverter.ToUInt32(data, 3);
     this.platform = (BattleNetPlatform) BitConverter.ToUInt32(data, 7);
     this.client = (BattleNetClient) BitConverter.ToUInt32(data, 11);
     this.version = BitConverter.ToUInt32(data, 15);
     this.language = BitConverter.ToUInt32(data, 0x13);
     this.localIP = new System.Net.IPAddress((long)BitConverter.ToUInt32(data, 0x17));
     this.timeZoneBias = BitConverter.ToUInt32(data, 0x1b);
     this.localeID = BitConverter.ToUInt32(data, 0x1f);
     this.languageID = BitConverter.ToUInt32(data, 0x23);
     this.countryAbbreviation = ByteConverter.GetNullString(data, 0x27);
     this.countryName = ByteConverter.GetNullString(data, 40 + this.countryAbbreviation.Length);
 }