コード例 #1
0
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = OtanixEnvironment.GetDatabaseManager().getQueryreactor())
            {
                EmuSettings.Initialize(dbClient);

                Start = DateTime.Now;
                Ranks.LoadMaxRankId(dbClient);
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Catacache -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Filter.Filter.Initialize();
                Filter.BlackWordsManager.Load(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Filtro -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Ban -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                newsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Notícia -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de item -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Furnidata.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Furnidata -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PromotionalBadgesManager.loadPromotionalBadges(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Emblemas promocionais -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoleManager.LoadRanks(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de papel -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                NewNavigatorManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Navegador -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente do quarto -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager.Initialize(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de realização -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadModActions(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Ferramenta de moderação-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetRace.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Sistema de estimação-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetOrders.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Ordens para animais -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                GuildsPartsManager.InitGroups(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Elementos dos grupos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                CatalogPremium.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de catálogo -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de som -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                youtubeManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Youtube TV Manager -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                piñataManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente Piñata -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                talentManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de talentos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                TargetedOfferManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente da oferta direta -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                CraftableProductsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de Produtos Crafáveis -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ClothingManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Gerente de vestuário-> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PrisaoManager.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Usuários presos -> PRONTO! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                LandingTopUsersManager.Initialize(dbClient);
                LandingTopUsersManager.Load();
                giftManager.init(dbClient);
                SpyChatMessage.Initialize();
                StaffChat.Initialize(dbClient);
                BonusManager.Initialize(dbClient);
                roomRankConfig.Initialize();

                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("[Otanix] @ Database -> Limpeza realizada! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("[Otanix] @ Gerente de jogo -> PRONTO! ");
        }
コード例 #2
0
ファイル: Game.cs プロジェクト: LuxuryJared/Coolmemes
        internal void ContinueLoading()
        {
            DateTime Start;
            TimeSpan TimeUsed;

            using (IQueryAdapter dbClient = OtanixEnvironment.GetDatabaseManager().getQueryreactor())
            {
                EmuSettings.Initialize(dbClient);

                Start = DateTime.Now;
                Ranks.LoadMaxRankId(dbClient);
                Catalog.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalog Cache -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Filter.Filter.Initialize();
                Filter.BlackWordsManager.Load(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Filter -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                BanManager.LoadBans(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ban Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                newsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("News Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ItemManager.LoadItems(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Item Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Furnidata.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Furnidata -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PromotionalBadgesManager.loadPromotionalBadges(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Promotional Badges Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoleManager.LoadRanks(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Ranks -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Navigator.Initialize(dbClient);
                NewNavigatorManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Navigator -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                RoomManager.LoadModels(dbClient);
                RoomManager.InitVotedRooms(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Room Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                AchievementManager.Initialize(dbClient);
                questManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Quest Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ModerationTool.LoadMessagePresets(dbClient);
                ModerationTool.LoadModActions(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Moderation Tool -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetRace.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Pet Race -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PetOrders.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Pet Orders -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                GuildsPartsManager.InitGroups(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Guilds Parts Manager-> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                Catalog.InitCache();
                CatalogPremium.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Catalog Manager -> PRONTO (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                SongManager.Initialize();
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Song Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                youtubeManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Youtube TV Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                piñataManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Piñata Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                talentManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Talent Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                TargetedOfferManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Targeted Offer Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                CraftableProductsManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Craftable Products Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                ClothingManager.Initialize(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Clothing Manager-> PRONTO (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                Start = DateTime.Now;
                PrisaoManager.Init(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Prison Manager -> READY (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");

                LandingTopUsersManager.Initialize(dbClient);
                LandingTopUsersManager.Load();
                giftManager.init(dbClient);
                SpyChatMessage.Initialize();
                StaffChat.Initialize(dbClient);
                BonusManager.Initialize(dbClient);
                roomRankConfig.Initialize();

                Start = DateTime.Now;
                DatabaseCleanup(dbClient);
                TimeUsed = DateTime.Now - Start;
                Logging.WriteLine("Database -> Cleanup Done (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)");
            }

            StartGameLoop();

            Logging.WriteLine("Game Loop -> READY ");
        }