Example #1
0
        public static void Process(MsgLogin msgLogin)
        {
            if (msgLogin.UniqueId != 0)
            {
                Core.MyUser          = new User();
                Core.MyUser.Id       = msgLogin.UniqueId;
                Core.MyUser.Username = msgLogin.GetUsername();
                Core.MyUser.Password = msgLogin.GetPassword();
                Core.Client.Socket.UseCompression = msgLogin.ClientSupportCompression;
                FConsole.WriteLine("Authentication successful. Your Username Id is: " + Core.MyUser.Id);
                var msgDataRequest = MsgDataRequest.CreateFriendListRequest(Core.MyUser.Id);
                Core.Client.Send(msgDataRequest);
            }
            else
            {
                FConsole.WriteLine("Authentication failed.");
            }

            FConsole.WriteLine($"MsgLogin Deserializing & Processing took {(((float)PacketRouter.Stopwatch.ElapsedTicks) / Stopwatch.Frequency) * 1000000000} ns");
        }
Example #2
0
        public static void Process(MsgLogin msgLogin)
        {
            if (msgLogin.UniqueId != 0)
            {
                Core.MyUser          = new User();
                Core.MyUser.Id       = msgLogin.UniqueId;
                Core.MyUser.Username = msgLogin.GetUsername();
                Core.MyUser.Password = msgLogin.GetPassword();
                FConsole.WriteLine("Authentication successful. Your user Id is: " + Core.MyUser.Id);
                Core.Client.OnLoggedIn?.Invoke();
                var msgDataRequest = MsgDataRequest.CreateFriendListRequest(Core.MyUser.Id);
                Core.Client.Send(msgDataRequest);
            }
            else
            {
                FConsole.WriteLine("Authentication failed.");
            }

            FConsole.WriteLine($"MsgLogin: {PacketRouter.Stopwatch.Elapsed.TotalMilliseconds:0.0000}ms");
        }