Ejemplo n.º 1
0
 private ClientInformation(PacketIn packet)
 {
     try
     {
         ProtocolVersion = packet.ReadByte();
         ushort num = packet.ReadUInt16();
         if (packet.RemainingLength != num)
         {
             Log.Warn(WCell_Core.Auth_Logon_with_invalid_length, num,
                      packet.RemainingLength);
         }
         _clientInstallationType = ClientTypeUtility.Lookup(packet.ReadFourCC());
         Version      = new ClientVersion(packet.ReadBytes(5));
         Architecture = packet.ReadFourCC().TrimEnd(new char[1]);
         OS           = packet.ReadFourCC().TrimEnd(new char[1]);
         _locale      = ClientLocaleUtility.Lookup(packet.ReadFourCC());
         TimeZone     = BitConverter.ToUInt32(packet.ReadBytes(4), 0);
         IPAddress    = new XmlIPAddress(packet.ReadBytes(4));
         Log.Info(WCell_Core.ClientInformationFourCCs, (object)ProtocolVersion,
                  (object)ClientInstallationType, (object)Version, (object)Architecture,
                  (object)OS, (object)Locale, (object)TimeZone, (object)IPAddress);
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
 private ClientInformation(PacketIn packet)
 {
     try
     {
         this.ProtocolVersion = packet.ReadByte();
         ushort num = packet.ReadUInt16();
         if (packet.RemainingLength != (int)num)
         {
             ClientInformation.Log.Warn(WCell_Core.Auth_Logon_with_invalid_length, (object)num,
                                        (object)packet.RemainingLength);
         }
         this._clientInstallationType = ClientTypeUtility.Lookup(packet.ReadFourCC());
         this.Version      = new ClientVersion(packet.ReadBytes(5));
         this.Architecture = packet.ReadFourCC().TrimEnd(new char[1]);
         this.OS           = packet.ReadFourCC().TrimEnd(new char[1]);
         this._locale      = ClientLocaleUtility.Lookup(packet.ReadFourCC());
         this.TimeZone     = BitConverter.ToUInt32(packet.ReadBytes(4), 0);
         this.IPAddress    = new XmlIPAddress(packet.ReadBytes(4));
         ClientInformation.Log.Info(WCell_Core.ClientInformationFourCCs, (object)this.ProtocolVersion,
                                    (object)this.ClientInstallationType, (object)this.Version, (object)this.Architecture,
                                    (object)this.OS, (object)this.Locale, (object)this.TimeZone, (object)this.IPAddress);
     }
     catch
     {
     }
 }
Ejemplo n.º 3
0
        private ClientInformation(PacketIn packet)
        {
            try
            {
                ProtocolVersion = packet.ReadByte();
                var claimedRemainingLength = packet.ReadUInt16();
                if (packet.RemainingLength != claimedRemainingLength)
                {
                    Log.Warn(WCell_Core.Auth_Logon_with_invalid_length, claimedRemainingLength, packet.RemainingLength);
                }

                var clientInstallationType = packet.ReadFourCC();
                _clientInstallationType = ClientTypeUtility.Lookup(clientInstallationType);

                Version      = new ClientVersion(packet.ReadBytes(5));
                Architecture = packet.ReadFourCC().TrimEnd('\0');
                OS           = packet.ReadFourCC().TrimEnd('\0');

                var locale = packet.ReadFourCC();
                _locale = ClientLocaleUtility.Lookup(locale);

                TimeZone  = BitConverter.ToUInt32(packet.ReadBytes(4), 0);
                IPAddress = new XmlIPAddress(packet.ReadBytes(4));

                Log.Info(WCell_Core.ClientInformationFourCCs, ProtocolVersion, ClientInstallationType, Version, Architecture, OS, Locale, TimeZone, IPAddress);
            }
            catch
            {
            }
        }