better protocol error tracking

This commit is contained in:
2024-05-16 19:37:55 -05:00
parent 6e1db9489a
commit 3820d179c6
2 changed files with 12 additions and 2 deletions
+11 -1
View File
@@ -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) {
+1 -1
View File
@@ -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);
}