Ejemplo n.º 1
0
        public void OnDataArrival(ENetPacket *packet, Channel channel)
        {
            var data = new byte[(int)packet->dataLength];

            Marshal.Copy(packet->data, data, 0, data.Length);

            if ((int)packet->dataLength >= 8 && Encrypt)
            {
                data = LoLServer.BlowFish.Decrypt(data);
            }
            LittleEndianReader reader = new LittleEndianReader(data);

            Message message = ProtocolManager.BuildMessage(this, channel, data);

            ProtocolManager.HandleMessage(message, this);
        }