Beispiel #1
0
        public static void OnConnect()
        {
            var LogonChallenge = new Packets.PacketClass(CMD_AUTH_LOGON_CHALLENGE);

            LogonChallenge.AddInt8(0x8);
            LogonChallenge.AddUInt16(0);        // Packet length
            LogonChallenge.AddString("WoW");
            LogonChallenge.AddInt8(VersionA);   // Version
            LogonChallenge.AddInt8(VersionB);   // Version
            LogonChallenge.AddInt8(VersionC);   // Version
            LogonChallenge.AddUInt16(Revision); // Revision
            LogonChallenge.AddString("x86", Reversed: true);
            LogonChallenge.AddString("Win", Reversed: true);
            LogonChallenge.AddString("enUS", false, true);
            LogonChallenge.AddInt32(0x3C); // Timezone
            LogonChallenge.AddUInt32(BitConverter.ToUInt32(((IPEndPoint)Connection.LocalEndPoint).Address.GetAddressBytes(), 0));
            LogonChallenge.AddInt8((byte)Account.Length);
            LogonChallenge.AddString(Account.ToUpper(), false);
            LogonChallenge.AddUInt16((ushort)(LogonChallenge.Data.Length - 4), 2);
            SendR(LogonChallenge);
            LogonChallenge.Dispose();
            Console.WriteLine("[{0}][Realm] Sent Logon Challenge.", Strings.Format(DateAndTime.TimeOfDay, "HH:mm:ss"));
        }