Exemplo n.º 1
0
        public ERROR_CODE CreateComponent()
        {
            ClientSession.CreateIndexPool(m_Config.MaxConnectionNumber);

            Room.NetSendFunc = this.SendData;
            RoomMgr.CreateRooms();

            MainPacketProcessor = new PacketProcessor();
            MainPacketProcessor.CreateAndStart(RoomMgr.GetRoomsList(), this);

            MainLogger.Info("CreateComponent - Success");
            return(ERROR_CODE.NONE);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.Title = "ConquerServer - Game";

            GameServerSocket Server = new GameServerSocket();

            Server.OnClientConnected    = OnClientConnect;
            Server.OnClientDisconnected = OnClientDisconnect;
            Server.OnClientReceived     = OnClientReceive;
            Server.Initialize();

            Database        = new DatabaseManager();
            PacketProcessor = new PacketProcessor(Database);

            ItemTypeLoader = new ItemTypeLoader();
            ItemTypeLoader.LoadItems();

            Kernel.LoadMaps();

            while (true)
            {
                Thread.Sleep(1);
            }
        }