Browse Source

better protocol error tracking

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
3820d179c6
  1. 12
      src/engine/Enum.java
  2. 2
      src/engine/net/NetMsgFactory.java

12
src/engine/Enum.java

@ -963,7 +963,17 @@ public class Enum {
SourceType returnMod; SourceType returnMod;
if (modName.isEmpty()) if (modName.isEmpty())
return SourceType.None; return SourceType.None;
switch(modName) {
case "Piercing":
modName = "Pierce";
break;
case "Crushing":
modName = "Crush";
break;
case "Slashing":
modName = "Slash";
break;
}
try { try {
returnMod = SourceType.valueOf(modName.replace(",", "")); returnMod = SourceType.valueOf(modName.replace(",", ""));
} catch (Exception e) { } catch (Exception e) {

2
src/engine/net/NetMsgFactory.java

@ -97,7 +97,7 @@ public class NetMsgFactory {
// if (MBServerStatics.worldServerName.equals("Grief")) // if (MBServerStatics.worldServerName.equals("Grief"))
Logger.error("Invalid protocol msg for player " + player.getFirstName() + " : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode); Logger.error("Invalid protocol msg for player " + player.getFirstName() + " : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode);
} else } 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);
} }

Loading…
Cancel
Save