private void OnReceivedPacket(object sender, PacketEventArgs args) { var packet = args.Packet; Console.WriteLine(packet.Type.ToString() + "," + packet.Opcode.ToString()); if(PacketHandlers.ContainsKey(packet.Type)) if(PacketHandlers[packet.Type].ContainsKey(packet.Opcode)) if(PacketHandlers[packet.Type][packet.Opcode] != null) PacketHandlers[packet.Type][packet.Opcode](packet); }