internal void reloaditems() { using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor()) { ItemManager.LoadItems(dbClient); globalInventory = new InventoryGlobal(); } }
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!"); }