fix: Packets not found

This commit is contained in:
Timothy Schenk 2023-11-08 19:48:58 +01:00
parent 1a6e1e4ccc
commit e4d6f15345

View file

@ -36,9 +36,9 @@ public class PacketDistributorService : IHostedService
var tempDeserializationMap =
new Dictionary<OperationCode, Func<byte[], IPacket>>();
var executingAssembly = Assembly.GetExecutingAssembly();
var packetsTypes = this.GetPacketsWithId(executingAssembly);
var packetHandlers = this.GetAllPacketHandlersWithId(executingAssembly);
var wonderkingAssembly = Assembly.GetAssembly(typeof(IPacket));
var packetsTypes = this.GetPacketsWithId(wonderkingAssembly);
var packetHandlers = this.GetAllPacketHandlersWithId(Assembly.GetExecutingAssembly());
this._packetHandlersInstantiation = new ConcurrentDictionary<OperationCode, object>();
packetHandlers.ForEach(x =>
{