Fix login

This commit is contained in:
Hondacrx
2024-11-16 23:05:45 -05:00
parent 76b0d747d3
commit 406aa5e445
26 changed files with 151 additions and 76 deletions
+3 -2
View File
@@ -385,9 +385,10 @@ namespace Game
if (packet == null)
return;
if (packet.GetOpcode() == ServerOpcodes.Unknown || packet.GetOpcode() == ServerOpcodes.Max)
if (!packet.IsValidOpcode())
{
Log.outError(LogFilter.Network, "Prevented sending of UnknownOpcode to {0}", GetPlayerInfo());
string specialName = packet.GetOpcode() == ServerOpcodes.Unknown ? "UNKNOWN_OPCODE" : "INVALID_OPCODE";
Log.outError(LogFilter.Network, $"Prevented sending of {specialName} (0x{packet.GetOpcode():04X}) to {GetPlayerInfo()}");
return;
}