Beispiel #1
0
        public Game(int conns)
        {
            this.ClientManager = new GameClientManager(conns);
            if (HabboIM.GetConfig().data["client.ping.enabled"] == "1")
            {
                this.ClientManager.method_10();
            }
            DateTime now = DateTime.Now;

            Logging.Write("Verbinde mit Datenbank.. ");
            try
            {
                using (DatabaseClient dbClient = HabboIM.GetDatabase().GetClient())
                {
                    Console.BackgroundColor = ConsoleColor.Black;
                    Logging.WriteLine("Fertig!", ConsoleColor.Green);
                    HabboIM.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.HabboIMEnvironment   = new HabboIMEnvironment();
                    this.Groups = new Groups();
                    HabboIMEnvironment.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 (MySqlException e)
            {
                Console.BackgroundColor = ConsoleColor.Black;
                Logging.WriteLine("Fehler!", ConsoleColor.Red);
                Logging.WriteLine(e.Message + " Check the given configuration details in config.conf\r\n", ConsoleColor.Blue);
                HabboIM.Destroy("", true, true);
                return;
            }
            this.task_0 = new Task(new Action(LowPriorityWorker.Initialise));
            this.task_0.Start();
            this.StartGameLoop();
        }