Exemplo n.º 1
0
        protected static void MainLoop()
        {
            while (ServerIsWork)
            {
                try
                {
                    if (Funcs.GetCurrentMilliseconds() - Cache.LastSaveUts > 1800000)
                    {
                        Cache.LastSaveUts = Funcs.GetCurrentMilliseconds();
                        Cache.SaveData();
                    }
                    //Services:

                    FeedbackService.Action();
                    AccountService.Action();
                    PlayerService.Action();
                    MapService.Action();//safe to uncommect?
                    ChatService.Action();
                    VisibleService.Action();
                    ControllerService.Action();
                    CraftService.Action();
                    ItemService.Action();
                    AiService.Action();
                    GeoService.Action();
                    StatsService.Action();
                    ObserverService.Action();
                    InformerService.Action();
                    TeleportService.Action();
                    AreaService.Action();
                    PartyService.Action();
                    SkillsLearnService.Action();
                    GuildService.Action();
                    DuelService.Action();

                    //Engines:

                    ActionEngine.Action();
                    AdminEngine.Action();
                    SkillEngine.Action();
                    QuestEngine.Action();

                    //Others:

                    DelayedAction.CheckActions();
                }
                catch (Exception ex)
                {
                    Log.ErrorException("MainLoop:", ex);
                }

                Thread.Sleep(10);
            }
            // ReSharper disable FunctionNeverReturns
        }
Exemplo n.º 2
0
        protected static void MainLoop()
        {
            while (ServerIsWork)
            {
                try
                {
                    if (RandomUtilities.GetCurrentMilliseconds() - Cache.LastSaveUts > 600000) // Backup Every 10 Min
                    {
                        Cache.LastSaveUts = RandomUtilities.GetCurrentMilliseconds();
                        Cache.SaveData();
                    }
                    //Services:

                    FeedbackService.Action();
                    AccountService.Action();
                    PlayerService.Action();
                    MapService.Action();
                    ChatService.Action();
                    VisibleService.Action();
                    ControllerService.Action();
                    CraftService.Action();
                    ItemService.Action();
                    AiService.Action();
                    GeoService.Action();
                    StatsService.Action();
                    ObserverService.Action();
                    TeleportService.Action();
                    AreaService.Action();
                    PartyService.Action();
                    SkillsLearnService.Action();
                    GuildService.Action();
                    DuelService.Action();

                    //Engines:

                    ActionEngine.Action();
                    AdminEngine.Action();
                    SkillEngine.Action();
                    QuestEngine.Action();

                    //Others:

                    DelayedAction.CheckActions();
                }
                catch (Exception ex)
                {
                    Logger.WriteLine(LogState.Exception, "MainLoop: " + ex.Message + " St: " + ex.StackTrace);
                }

                Thread.Sleep(10);
            }
        }
Exemplo n.º 3
0
        protected static void MainLoop()
        {
            while (ServerIsWork)
            {
                try
                {
                    //Services:

                    FeedbackService.Action();
                    AccountService.Action();
                    PlayerService.Action();
                    MapService.Action();
                    ChatService.Action();
                    VisibleService.Action();
                    ControllerService.Action();
                    CraftService.Action();
                    ItemService.Action();
                    AiService.Action();
                    GeoService.Action();
                    StatsService.Action();
                    ObserverService.Action();
                    TeleportService.Action();
                    AreaService.Action();
                    PartyService.Action();
                    SkillsLearnService.Action();
                    GuildService.Action();
                    DuelService.Action();

                    //Engines:

                    ActionEngine.Action();
                    AdminEngine.Action();
                    SkillEngine.Action();
                    QuestEngine.Action();

                    //Cache
                    UsedPlayerNames = new List <string>();
                    UsedGuildNames  = new List <string>();

                    //Others:

                    DelayedAction.CheckActions();
                }
                catch (Exception ex)
                {
                    Logger.WriteLine(LogState.Exception, "MainLoop: " + ex.Message + " St: " + ex.StackTrace);
                }

                Thread.Sleep(10);
            }
        }
Exemplo n.º 4
0
        protected static void MainLoop()
        {
            while (ServerIsWork)
            {
                try
                {
                    //Services:

                    AccountService.Action();
                    AiService.Action();
                    ChatService.Action();
                    ControllerService.Action();
                    FeedbackService.Action();
                    ObserverService.Action();
                    PlayerService.Action();
                    SkillsLearnService.Action();
                    StatsService.Action();
                    StorageService.Action();
                    TeleportService.Action();
                    VisibleService.Action();

                    //Engines:

                    AdminEngine.Action();
                    SkillEngine.Action();

                    //Others:

                    DelayedAction.CheckActions();
                }
                catch (Exception ex)
                {
                    Log.ErrorException("MainLoop:", ex);
                }

                Thread.Sleep(10);
            }
        }