Ejemplo n.º 1
0
        protected override void OnUnload()
        {
            Alex.InGame = false;

            new Thread(
                o =>
            {
                NetworkProvider.Close();

                World.Destroy();
                WorldProvider.Dispose();

                _playingHud.Unload();

                //var threadPool =
                //	ReflectionHelper.GetPrivateStaticPropertyValue<MiNET.Utils.DedicatedThreadPool>(
                //		typeof(MiNetServer), "FastThreadPool");
                //threadPool?.Dispose();
                //ReflectionHelper.SetPrivateStaticPropertyValue<MiNET.Utils.DedicatedThreadPool>(typeof(MiNetServer), "FastThreadPool", null);

                RichPresenceProvider.ClearPresence();
            }).Start();

            //GetService<IEventDispatcher>().UnregisterEvents(_playingHud.Chat);
            //_playingHud.Chat =
        }
Ejemplo n.º 2
0
        protected override void OnUnload()
        {
            Alex.InGame = false;

            World.Destroy();
            WorldProvider.Dispose();
            NetworkProvider.Close();

            _playingHud.Unload();

            RichPresenceProvider.ClearPresence();
            //GetService<IEventDispatcher>().UnregisterEvents(_playingHud.Chat);
            //_playingHud.Chat =
        }