Vorspire
Knight
I'm not sure if this is intentional or not, but;
When you replace an existing packet handler by calling PacketHandlers.Register, the 6017 version never gets replaced due to this null check, I'v no idea why this null check is there, maybe it's intentional for whatever reason?
Anyway, the only way around this at the moment is to make a subsequent call to PacketHandlers.Register6017 with the same arguments you wish to override the handler with.
This problem became apparent when testing with client 7.0.24 classic.
Code:
public static void Register(int packetID, int length, bool ingame, OnPacketReceive onReceive)
{
m_Handlers[packetID] = new PacketHandler(packetID, length, ingame, onReceive);
if (m_6017Handlers[packetID] == null)
m_6017Handlers[packetID] = new PacketHandler(packetID, length, ingame, onReceive);
}
When you replace an existing packet handler by calling PacketHandlers.Register, the 6017 version never gets replaced due to this null check, I'v no idea why this null check is there, maybe it's intentional for whatever reason?
Anyway, the only way around this at the moment is to make a subsequent call to PacketHandlers.Register6017 with the same arguments you wish to override the handler with.
This problem became apparent when testing with client 7.0.24 classic.