public Game(int conns) { this.ClientManager = new GameClientManager(conns); if (GoldTree.GetConfig().data["client.ping.enabled"] == "1") { this.ClientManager.method_10(); } DateTime now = DateTime.Now; Logging.Write("Connecting to the database.. "); try { using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient()) { Logging.WriteLine("completed!", ConsoleColor.Green); GoldTree.Game = this; this.LoadServerSettings(dbClient); this.BanManager = new ModerationBanManager(); this.RoleManager = new RoleManager(); this.HelpTool = new HelpTool(); this.Catalog = new Catalog(); this.Navigator = new Navigator(); this.ItemManager = new ItemManager(); this.RoomManager = new RoomManager(); this.AdvertisementManager = new AdvertisementManager(); this.PixelManager = new PixelManager(); this.AchievementManager = new AchievementManager(); this.ModerationTool = new ModerationTool(); this.BotManager = new BotManager(); this.Marketplace = new Marketplace(); this.QuestManager = new QuestManager(); this.GoldTreeEnvironment = new GoldTreeEnvironment(); this.Groups = new Groups(); GoldTreeEnvironment.LoadExternalTexts(dbClient); this.BanManager.Initialise(dbClient); this.RoleManager.method_0(dbClient); this.HelpTool.method_0(dbClient); this.HelpTool.method_3(dbClient); this.ModerationTool.method_1(dbClient); this.ModerationTool.method_2(dbClient); this.ItemManager.method_0(dbClient); this.Catalog.method_0(dbClient); this.Catalog.method_1(); this.Navigator.method_0(dbClient); this.RoomManager.method_8(dbClient); this.RoomManager.method_0(); this.NavigatorCache = new NavigatorCache(); this.AdvertisementManager.method_0(dbClient); this.BotManager.method_0(dbClient); AchievementManager.smethod_0(dbClient); this.PixelManager.method_0(); ChatCommandHandler.smethod_0(dbClient); this.QuestManager.method_0(); Groups.smethod_0(dbClient); this.RestoreStatistics(dbClient, 1); } } catch (MySql.Data.MySqlClient.MySqlException e) { Logging.WriteLine("failed!", ConsoleColor.Red); Logging.WriteLine(e.Message + " Check the given configuration details in config.conf\r\n", ConsoleColor.Yellow); GoldTree.Destroy("", true, true); return; } this.task_0 = new Task(new Action(LowPriorityWorker.Initialise)); this.task_0.Start(); StartGameLoop(); }