Esempio n. 1
0
        private static void ProcessOutgoingQueue(Packet packet)
        {
            PacketSentEvent?.Invoke(packet.GetPacket(), packet.GetLength());

            PacketHandler handler = OutgoingPacketHandlers.GetHandler(packet.GetPacketID());

            int length = _getPacketLength(packet.GetPacketID());

            handler?.OnReceive?.Invoke(new PacketReader(packet.GetPacket(), packet.GetLength(), length > 0));

            PacketWaitEntries.CheckWait(packet.GetPacket(), PacketDirection.Outgoing);
        }
Esempio n. 2
0
        private static void ProcessOutgoingQueue(Packet packet)
        {
            try
            {
                PacketSentEvent?.Invoke(packet.GetPacket(), packet.GetLength());

                PacketHandler handler = OutgoingPacketHandlers.GetHandler(packet.GetPacketID());

                int length = _getPacketLength(packet.GetPacketID());

                handler?.OnReceive?.Invoke(new PacketReader(packet.GetPacket(), packet.GetLength(), length > 0));

                PacketWaitEntries.CheckWait(packet.GetPacket(), PacketDirection.Outgoing);
            }
            catch (Exception e)
            {
                e.ToExceptionless().SetProperty("Packet", packet.GetPacket())
                .SetProperty("Player", Player.ToString()).SetProperty("WorldItemCount", Items.Count())
                .SetProperty("WorldMobileCount", Mobiles.Count()).Submit();
            }
        }