예제 #1
0
파일: Game.cs 프로젝트: BjkGkh/Custom-R2
        internal Game(int conns)
        {
            this._packetManager = new PacketManager();
            this._packetManager.RegisterHandshake();
            this._packetManager.RegisterCatalog();
            this._packetManager.RegisterNavigator();
            this._packetManager.RegisterRoomAction();
            this._packetManager.RegisterRoomConnection();
            this._packetManager.RegisterRoomChat();

            ClientManager = new GameClientManager();

            using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
            {

                //SilverwaveEnvironment.GameInstance = this;
                DateTime start = DateTime.Now;

                BanManager = new ModerationBanManager();
                RoleManager = new RoleManager();
                Navigator = new Navigator();
                ItemManager = new ItemManager();
                Catalog = new Catalog();
                RoomManager = new RoomManager();
                PixelManager = new PixelManager();
                HotelView = new HotelView();

                ModerationTool = new ModerationTool();
                BotManager = new BotManager();
                questManager = new QuestManager();
                Events = new RoomEvents();
                groupManager = new GroupManager();
                talentManager = new TalentManager();
                snowManager = new SnowManager();
                //soundMachineManager = new SoundMachineManager();

                TimeSpan spent = DateTime.Now - start;
                Logging.WriteLine("Inicio de " + this._packetManager.GetIncomingCount + " Handlers -> ¡LISTOS!", ConsoleColor.Green);
                Logging.WriteLine("Inicio de Classes -> ¡LISTOS!", ConsoleColor.Green);
            }
        }