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 { @@ -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) {

2
src/engine/net/NetMsgFactory.java

@ -97,7 +97,7 @@ public class NetMsgFactory { @@ -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);
}

Loading…
Cancel
Save