From 0a09cd7c29e53b1272c1fea89ea7a6afee191757 Mon Sep 17 00:00:00 2001 From: Scald <104459145+Arikatsu@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:54:46 +0530 Subject: [PATCH] Goofy ahh mistake --- .../lunarcore/server/game/GameSession.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/main/java/emu/lunarcore/server/game/GameSession.java b/src/main/java/emu/lunarcore/server/game/GameSession.java index 8c4c34f..9ad90ec 100644 --- a/src/main/java/emu/lunarcore/server/game/GameSession.java +++ b/src/main/java/emu/lunarcore/server/game/GameSession.java @@ -2,6 +2,7 @@ package emu.lunarcore.server.game; import java.net.InetSocketAddress; +import ch.qos.logback.classic.Logger; import emu.lunarcore.LunarCore; import emu.lunarcore.game.account.Account; import emu.lunarcore.game.player.Player; @@ -127,11 +128,9 @@ public class GameSession { // Log packet if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode)) { - return; + if (!(LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode))) { + logPacket("RECV", opcode, data); } - - logPacket("RECV", opcode, data); } // Handle @@ -156,11 +155,9 @@ public class GameSession { // Log if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getCmdId())) { - return; + if (!(LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getCmdId()))) { + logPacket("RECV", packet.getCmdId(), packet.getData()); } - - logPacket("SEND", packet.getCmdId(), packet.getData()); } } @@ -175,11 +172,9 @@ public class GameSession { // Log if (LunarCore.getConfig().getLogOptions().packets) { - if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId)) { - return; - } - - logPacket("SEND", cmdId, null); + if (!(LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId))) { + logPacket("RECV", cmdId, null); + } } } }