public static void Logout() { Engine.TickWorkQueue.Enqueue(() => { dynamic socket = new ReflectionObject(Reflection.GetTypePropertyValue <dynamic>("ClassicUO.Network.NetClient", "Socket", null)); if (socket.IsConnected) { socket.Disconnect(); } dynamic game = new ReflectionObject(Reflection.GetTypePropertyValue <dynamic>("ClassicUO.Client", "Game", null)); object instance = Reflection.CreateInstanceOfType("ClassicUO.Game.Scenes.LoginScene"); game.SetScene(instance); }); }