stage reward for item type

This commit is contained in:
rfi
2023-11-24 20:01:26 +07:00
parent cf82daad00
commit 1f4b0b660f
7 changed files with 151 additions and 36 deletions

View File

@@ -57,12 +57,13 @@ namespace AscNet.GameServer
while (readbytes < len)
{
int packetLen = BinaryPrimitives.ReadInt32LittleEndian(msg.AsSpan()[readbytes..]);
readbytes += 4;
if (len > 0)
readbytes += 4;
if (packetLen < 1)
{
break;
}
else if (packetLen > len)
else if (packetLen > len && len > 0)
{
prevBuf += len;
break;
@@ -132,7 +133,7 @@ namespace AscNet.GameServer
}
catch (Exception ex)
{
log.Error("Failed to invoke handler: " + ex.Message + $", Raw {packet.Type} packet: " + BitConverter.ToString(debugContent).Replace("-", ""));
log.Error("Failed to invoke handler: " + ex.ToString() + $", Raw {packet.Type} packet: " + BitConverter.ToString(debugContent).Replace("-", ""));
}
}
}