Complete rework of Dispatch, Added DebugMode

This commit is contained in:
Benjamin Elsdon
2022-05-01 00:30:56 +08:00
parent 4db1724d06
commit 947d3e5745
8 changed files with 206 additions and 262 deletions

View File

@@ -163,7 +163,7 @@ public class GameSession extends KcpChannel {
}
// Log
if (Grasscutter.getConfig().getGameServerOptions().LOG_PACKETS) {
if (Grasscutter.getConfig().DebugMode.equalsIgnoreCase("ALL")) {
logPacket(packet);
}
@@ -230,7 +230,7 @@ public class GameSession extends KcpChannel {
}
// Log packet
if (Grasscutter.getConfig().getGameServerOptions().LOG_PACKETS) {
if (Grasscutter.getConfig().DebugMode.equalsIgnoreCase("ALL")) {
if (!loopPacket.contains(opcode)) {
Grasscutter.getLogger().info("RECV: " + PacketOpcodesUtil.getOpcodeName(opcode) + " (" + opcode + ")");
System.out.println(Utils.bytesToHex(payload));