예제 #1
0
 void parser_onNewPacket(ClientMessage Message)
 {
     try
     {
         MessageHandler.HandleRequest(Message);
     }
     catch (Exception e) { Logging.LogPacketException(Message.ToString(), e.ToString()); }
 }
예제 #2
0
        public bool TryExecutePacket(GameClient Session, ClientMessage Packet)
        {
            IPacketEvent Pak = null;

            if (!this._incomingPackets.TryGetValue(Packet.Id, out Pak))
            {
                return false;
            }

            WriteLine("Cargado ->" + Packet.ToString(), ConsoleColor.White);// WriteLine("Handled Packet:" + Packet.ToString(), ConsoleColor.Green); )

            if (!IgnoreTasks)
            {
                ExecutePacketAsync(Session, Packet, Pak);
                return true;
            }
            else
            {
                Pak.Parse(Session, Packet);
                return true;
            }
        }