Ejemplo n.º 1
0
 public void Translate(Client client, byte packetId, PacketIn packet)
 {
     if (!Handlers.ContainsKey(packetId))
     {
         PacketTranslator.DumpUnknown(client, packet);
     }
     else
     {
         Handlers[packetId](client, packet);
     }
 }
Ejemplo n.º 2
0
 public void Translate(Client client, byte packetId, PacketIn packet)
 {
     if (!Handlers.ContainsKey(packetId))
     {
         ServerConsole.WriteLine("Unknown Packet Detected.", MessageLevel.Warning);
         PacketTranslator.DumpUnknown(client, packet);
     }
     else
     {
         try
         {
             Handlers[packetId](client, packet);
         }
         catch (Exception ex)
         {
             ServerConsole.WriteLine("Translator Error: {0} for packet {1}", MessageLevel.Error, ex.ToString(), packetId);
         }
     }
 }