Ejemplo n.º 1
0
        internal void Hook()
        {
            m_launchedTime = DateTime.Now;
            try
            {
                Program.SetTitle(true);

                m_handlerManager = new HandlerManager(m_assembly, m_frameworkAssembly);

                WaitForHandlers();

                Game.Server.ControllerManager controllerManager = m_handlerManager.ControllerManager;

                // Intercept events to copy and invoke
                EventManager.Instance.Intercept(controllerManager);

                // command loader
                mainLog.Info("IRSE: Loading Game Console Commands..");
                // soon

                ConsoleCommandManager.InitCommands(controllerManager);



                // start gamelogic coroutine
                Program.ConsoleCoroutine = CommandSystem.Singleton.Logic(controllerManager, Game.Configuration.Globals.NoConsoleAutoComplete);


                SendKeys.SendWait("{ENTER}"); // activates the game console commands

                // plugin loader
                mainLog.Info("IRSE: Initializing Plugins...");
                m_pluginManager = new PluginManager();
                m_pluginManager.InitializeAllPlugins();

                // Wait 5 seconds before activating ServerInstance.Instance.IsRunning

                mainLog.Info("IRSE: Startup Procedure Complete!");
                IsRunning = true; // Server is running by now
            }
            catch (Exception ex)
            {
                mainLog.Info("IRSE: Startup Procedure FAILED!");
                mainLog.Info("IRSE: Haulting Server.. Major problem detected!!!!!!!! - Exception:");
                mainLog.Error(ex.ToString());

                Console.ReadLine();
                Stop();
            }
        }
Ejemplo n.º 2
0
        internal void Hook()
        {
            m_launchedTime = DateTime.Now;
            try
            {
                m_handlerManager = new HandlerManager(m_assembly, m_frameworkAssembly);

                WaitForHandlers();

                ControllerManager controllerManager = m_handlerManager.ControllerManager;

                // Intercept events to copy and invoke
                EventManager.Instance.Intercept(controllerManager);

                // ir command loader
                mainLog.Info("IRSE: Loading Game Console Commands..");
                ConsoleCommandManager.InitAndReplace(controllerManager);

                Program.ConsoleCoroutine = ConsoleCommandManager.IRSECommandSystem
                                           .Logic(controllerManager, Game.Configuration.Globals.NoConsoleAutoComplete || Program.CommandLineArgs.Contains("-noConsoleAutoComplete"));

                // plugin loader
                mainLog.Info("IRSE: Initializing Plugins...");
                m_pluginManager.InitializeAllPlugins();

                // Wait 5 seconds before activating ServerInstance.Instance.IsRunning
                mainLog.Info("IRSE: Startup Procedure Complete!");

                Program.Wait = false;

                SetIsRunning(); // Server is running by now
                SetIsStarting(false);

                Program.SetTitle(true);
            }
            catch (Exception ex)
            {
                mainLog.Info("IRSE: Startup Procedure FAILED!");
                mainLog.Info("IRSE: Haulting Server.. Major problem detected!!!!!!!! - Exception:");
                mainLog.Error(ex.ToString());

                Stop();
            }
        }