From 3820d179c6c52f42af33d09e52a7cda32243ae08 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 16 May 2024 19:37:55 -0500 Subject: [PATCH] better protocol error tracking --- src/engine/Enum.java | 12 +++++++++++- src/engine/net/NetMsgFactory.java | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/engine/Enum.java b/src/engine/Enum.java index 47c48bbb..b52fdfd7 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -963,7 +963,17 @@ public class Enum { SourceType returnMod; if (modName.isEmpty()) return SourceType.None; - + switch(modName) { + case "Piercing": + modName = "Pierce"; + break; + case "Crushing": + modName = "Crush"; + break; + case "Slashing": + modName = "Slash"; + break; + } try { returnMod = SourceType.valueOf(modName.replace(",", "")); } catch (Exception e) { diff --git a/src/engine/net/NetMsgFactory.java b/src/engine/net/NetMsgFactory.java index c1cbba91..6028804d 100644 --- a/src/engine/net/NetMsgFactory.java +++ b/src/engine/net/NetMsgFactory.java @@ -97,7 +97,7 @@ public class NetMsgFactory { // if (MBServerStatics.worldServerName.equals("Grief")) Logger.error("Invalid protocol msg for player " + player.getFirstName() + " : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode); } else - Logger.error("Invalid protocol msg : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode); + Logger.error("PROTOCOL ERROR: Player: " + ((ClientConnection) origin).getPlayerCharacter().getName() + " Account: " + ((ClientConnection) origin).getPlayerCharacter().getAccount().getUname() + "Invalid protocol msg : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode); }