Browse Source

protocol error logging

lakebane-mine-tele
FatBoy-DOTC 2 months ago
parent
commit
6631c6a5d7
  1. 10
      src/engine/mobileAI/MobAI.java
  2. 7
      src/engine/net/NetMsgFactory.java

10
src/engine/mobileAI/MobAI.java

@ -205,11 +205,11 @@ public class MobAI {
mob.setLastAttackTime(System.currentTimeMillis() + attackDelay); mob.setLastAttackTime(System.currentTimeMillis() + attackDelay);
} }
if (mob.isSiege()) { //if (mob.isSiege()) {
PowerProjectileMsg ppm = new PowerProjectileMsg(mob, target); // PowerProjectileMsg ppm = new PowerProjectileMsg(mob, target);
ppm.setRange(50); // ppm.setRange(50);
DispatchMessage.dispatchMsgToInterestArea(mob, ppm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false); // DispatchMessage.dispatchMsgToInterestArea(mob, ppm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
} //}
} catch (Exception e) { } catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackBuilding" + " " + e.getMessage()); Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackBuilding" + " " + e.getMessage());

7
src/engine/net/NetMsgFactory.java

@ -13,6 +13,7 @@ import engine.exception.FactoryBuildException;
import engine.gameManager.ChatManager; import engine.gameManager.ChatManager;
import engine.net.client.ClientConnection; import engine.net.client.ClientConnection;
import engine.net.client.Protocol; import engine.net.client.Protocol;
import engine.net.client.msg.ErrorPopupMsg;
import engine.objects.PlayerCharacter; import engine.objects.PlayerCharacter;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import org.joda.time.DateTime; import org.joda.time.DateTime;
@ -94,11 +95,9 @@ public class NetMsgFactory {
if (origin instanceof ClientConnection) { if (origin instanceof ClientConnection) {
PlayerCharacter player = ((ClientConnection) origin).getPlayerCharacter(); PlayerCharacter player = ((ClientConnection) origin).getPlayerCharacter();
if (player != null) { if (player != null) {
// 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 ErrorPopupMsg epm = new ErrorPopupMsg(16, "REPORT WHAT YOU JUST TRIED TO DO");
Logger.error("Invalid protocol msg : " + opcode + " lastopcode: " + origin.lastProtocol.name() + " Error Code : " + errorCode); }
} }
return null; return null;

Loading…
Cancel
Save