public Game(int conns) { ClientManager = new GameClientManager(conns); if (PhoenixEnvironment.GetConfig().data["client.ping.enabled"] == "1") { ClientManager.StartConnectionChecker(); } DateTime Now = DateTime.Now; Logging.Write("Connecting to database..."); using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient()) { Logging.WriteLine("completed!"); PhoenixEnvironment.GameInstance = this; LoadSettings(adapter); BanManager = new ModerationBanManager(); RoleManager = new RoleManager(); HelpTool = new HelpTool(); Catalog = new Catalog(); Navigator = new Navigator(); ItemManager = new ItemManager(); RoomManager = new RoomManager(); AdvertisementManager = new AdvertisementManager(); PixelManager = new PixelManager(); AchievementManager = new AchievementManager(); ModerationTool = new ModerationTool(); BotManager = new BotManager(); Marketplace = new Marketplace(); QuestManager = new QuestManager(); TextManage = new TextManager(); Guilds = new GroupManager(); TextManager.LoadTexts(adapter); BanManager.LoadBans(adapter); RoleManager.LoadRoles(adapter); HelpTool.LoadCategories(adapter); HelpTool.LoadTopics(adapter); ModerationTool.LoadMessagePresets(adapter); ModerationTool.LoadPendingTickets(adapter); ItemManager.LoadItems(adapter); Catalog.Initialize(adapter); Catalog.InitCache(); Navigator.Initialize(adapter); RoomManager.LoadModels(adapter); RoomManager.LoadCache(); NavigatorCache = new NavigatorCache(); AdvertisementManager.LoadRoomAdvertisements(adapter); BotManager.LoadBots(adapter); AchievementManager.LoadAchievements(adapter); PixelManager.Start(); ChatCommandHandler.InitFilter(adapter); QuestManager.InitQuests(); GroupManager.LoadGroups(adapter); DatabaseCleanup(adapter, 1); } Task = new Task(new Action(LowPriorityWorker.Process)); Task.Start(); }
internal void ContinueLoading() { DateTime Start; TimeSpan TimeUsed; using (IQueryAdapter dbClient = ButterflyEnvironment.GetDatabaseManager().getQueryreactor()) { Start = DateTime.Now; BanManager.LoadBans(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Ban manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; //RoleManager.LoadRoles(dbClient); RoleManager.LoadRights(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Role manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; HelpTool.LoadCategories(dbClient); HelpTool.LoadTopics(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Help tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Catalog.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Catacache -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Navigator.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Navigator -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; ItemManager.LoadItems(dbClient); globalInventory = new InventoryGlobal(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Item manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; RoomManager.LoadModels(dbClient); RoomManager.InitRoomLinks(dbClient); RoomManager.InitVotedRooms(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Room manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; AdvertisementManager.LoadRoomAdvertisements(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Adviserment manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; AchievementManager = new AchievementManager(dbClient); questManager.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Achievement manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; ModerationTool.LoadMessagePresets(dbClient); ModerationTool.LoadPendingTickets(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Moderation tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; BotManager.LoadBots(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Bot manager manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Catalog.InitCache(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Catalogue manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; SongManager.Initialize(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Sound manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; DatabaseCleanup(dbClient); LowPriorityWorker.Init(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Database -> Cleanup performed! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); } StartGameLoop(); Logging.WriteLine("Game manager -> READY!"); DataSocket.SetupListener(42); DataSocket.Start(); }
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! "); }
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 "); }
/// <summary> /// Initializes a new instance of the <see cref="HabboHotel" /> class. /// </summary> /// <param name="conns">The conns.</param> internal HabboHotel(int conns) { YupiWriterManager.WriteLine(@"Starting up Yupi Emulator for " + Environment.MachineName + "...", @"Yupi.Boot"); _clientManager = new GameClientManager(); using (IQueryAdapter queryReactor = Yupi.GetDatabaseManager().GetQueryReactor()) { AbstractBar bar = new AnimatedBar(); const int wait = 15, end = 5; uint itemsLoaded; uint navigatorLoaded; uint roomModelLoaded; uint achievementLoaded; uint pollLoaded; Progress(bar, wait, end, "Cleaning dirty in database..."); DatabaseCleanup(queryReactor); Progress(bar, wait, end, "Loading Bans..."); _banManager = new ModerationBanManager(); _banManager.LoadBans(queryReactor); Progress(bar, wait, end, "Loading Roles..."); _roleManager = new RoleManager(); _roleManager.LoadRights(queryReactor); Progress(bar, wait, end, "Loading Items..."); _itemManager = new ItemManager(); _itemManager.LoadItems(queryReactor, out itemsLoaded); Progress(bar, wait, end, "Loading Catalog..."); _catalog = new CatalogManager(); Progress(bar, wait, end, "Loading Targeted Offers..."); _targetedOfferManager = new TargetedOfferManager(); Progress(bar, wait, end, "Loading Clothing..."); _clothingManager = new ClothingManager(); _clothingManager.Initialize(queryReactor); Progress(bar, wait, end, "Loading Rooms..."); _roomManager = new RoomManager(); _roomManager.LoadModels(queryReactor, out roomModelLoaded); Progress(bar, wait, end, "Loading NavigatorManager..."); _navigatorManager = new HotelBrowserManager(); _navigatorManager.Initialize(queryReactor, out navigatorLoaded); Progress(bar, wait, end, "Loading Groups..."); _groupManager = new GroupManager(); _groupManager.InitGroups(); Progress(bar, wait, end, "Loading PixelManager..."); _pixelManager = new ExchangeManager(); Progress(bar, wait, end, "Loading HotelView..."); _hotelView = new HotelLandingManager(); Progress(bar, wait, end, "Loading Hall Of Fame..."); _hallOfFame = new HallOfFame(); Progress(bar, wait, end, "Loading ModerationTool..."); _moderationTool = new ModerationTool(); _moderationTool.LoadMessagePresets(queryReactor); _moderationTool.LoadPendingTickets(queryReactor); Progress(bar, wait, end, "Loading Bots..."); _botManager = new BotManager(); Progress(bar, wait, end, "Loading Events..."); _events = new RoomEvents(); Progress(bar, wait, end, "Loading Talents..."); _talentManager = new TalentManager(); _talentManager.Initialize(queryReactor); Progress(bar, wait, end, "Loading Pinata..."); _pinataHandler = new PinataHandler(); _pinataHandler.Initialize(queryReactor); Progress(bar, wait, end, "Loading Crackable Eggs..."); _crackableEggHandler = new CrackableEggHandler(); _crackableEggHandler.Initialize(queryReactor); Progress(bar, wait, end, "Loading Polls..."); _pollManager = new PollManager(); _pollManager.Init(queryReactor, out pollLoaded); Progress(bar, wait, end, "Loading Achievements..."); _achievementManager = new AchievementManager(queryReactor, out achievementLoaded); Progress(bar, wait, end, "Loading StaticMessages ..."); StaticMessagesManager.Load(); Progress(bar, wait, end, "Loading Guides ..."); _guideManager = new GuideManager(); Progress(bar, wait, end, "Loading and Registering Commands..."); CommandsManager.Register(); CacheManager.StartProcess(); //Progress(bar, wait, end, "Loading ServerMutantManager..."); //this.ServerMutantManager = new ServerMutantManager(); Console.Write("\r".PadLeft(Console.WindowWidth - Console.CursorLeft - 1)); } }
internal void ContinueLoading() { DateTime Start; TimeSpan TimeUsed; using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor()) { Start = DateTime.Now; BanManager.LoadBans(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Ban manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; //RoleManager.LoadRoles(dbClient); RoleManager.LoadRights(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Role manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Catalog.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Catacache -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Navigator.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Navigator -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; ItemManager.LoadItems(dbClient); globalInventory = new InventoryGlobal(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Item manager -> 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; Ranking.initRankings(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("User rankings -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; AdvertisementManager.LoadRoomAdvertisements(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Adviserment manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; AchievementManager = new AchievementManager(dbClient); questManager.Initialize(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Achievement manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; ModerationTool.LoadMessagePresets(dbClient); ModerationTool.LoadPendingTickets(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Moderation tool -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; BotManager.LoadBots(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Bot manager manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; PetRace.Init(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Pet system -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; Catalog.InitCache(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Catalogue manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); Start = DateTime.Now; SongManager.Initialize(); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Sound manager -> READY! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); //GuildsPartsData.InitGroups(); //groupManager = new GroupManager(dbClient); Start = DateTime.Now; DatabaseCleanup(dbClient); LowPriorityWorker.Init(dbClient); TimeUsed = DateTime.Now - Start; Logging.WriteLine("Database -> Cleanup performed! (" + TimeUsed.Seconds + " s, " + TimeUsed.Milliseconds + " ms)"); } StartGameLoop(); Logging.WriteLine("Game manager -> READY!"); }