Exemplo n.º 1
0
        static NetworkFacade()
        {
            TransferringClients = new BlockingCollection <ClientToken>();
            StartTime           = DateTime.Now;

            //INTERNAL PACKETS SENT BY LOGINSERVER
            PacketHandlers.Register(0x01, false, 0, new OnPacketReceive(LoginPacketHandlers.HandleClientToken));
            PacketHandlers.Register(0x02, false, 0, new OnPacketReceive(LoginPacketHandlers.HandleCharacterRetirement));

            //PACKETS SENT BY CLIENT
            PacketHandlers.Register((byte)PacketType.LOGIN_REQUEST_CITY, false, 0, new OnPacketReceive(ClientPacketHandlers.InitialClientConnect));
            PacketHandlers.Register((byte)PacketType.CHALLENGE_RESPONSE, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleChallengeResponse));
            PacketHandlers.Register((byte)PacketType.CHARACTER_CREATE_CITY, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleCharacterCreate));
            PacketHandlers.Register((byte)PacketType.CITY_TOKEN, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleCityToken));
            PacketHandlers.Register((byte)PacketType.PLAYER_SENT_LETTER, true, 0, new OnPacketReceive(ClientPacketHandlers.HandlePlayerSentLetter));
            PacketHandlers.Register((byte)PacketType.PLAYER_BROADCAST_LETTER, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleBroadcastLetter));
            PacketHandlers.Register((byte)PacketType.LOT_COST, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleLotCostRequest));
            PacketHandlers.Register((byte)PacketType.LOT_PURCHASE_REQUEST, true, 0, new OnPacketReceive(ClientPacketHandlers.HandleLotPurchaseRequest));
        }