Browse Source

no more spamming console

lakebane
FatBoy-DOTC 1 week ago
parent
commit
6985dffda4
  1. 12
      src/engine/mobileAI/MobAI.java
  2. 8
      src/engine/net/client/ClientConnection.java

12
src/engine/mobileAI/MobAI.java

@ -321,20 +321,20 @@ public class MobAI { @@ -321,20 +321,20 @@ public class MobAI {
if (mob == null)
return false;
if(mob.isPlayerGuard == true){
if(mob.isPlayerGuard){
int contractID;
int contractID = 0;
if(mob.BehaviourType.equals(Enum.MobBehaviourType.GuardMinion))
if(mob.BehaviourType.equals(Enum.MobBehaviourType.GuardMinion) && mob.npcOwner != null)
contractID = mob.npcOwner.contract.getContractID();
else
else if(mob.contract != null)
contractID = mob.contract.getContractID();
if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false)
if(Enum.MinionType.ContractToMinionMap.containsKey(contractID) && !Enum.MinionType.ContractToMinionMap.get(contractID).isMage())
return false;
}
if (mob.mobPowers.isEmpty())
if (mob.mobPowers == null || mob.mobPowers.isEmpty())
return false;
if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) {

8
src/engine/net/client/ClientConnection.java

@ -227,10 +227,10 @@ public class ClientConnection extends AbstractConnection { @@ -227,10 +227,10 @@ public class ClientConnection extends AbstractConnection {
SessionManager.remSession(
SessionManager.getSession(sessionID));
} catch (NullPointerException e) {
Logger
.error(
"Tried to remove improperly initialized session. Skipping." +
e);
//Logger
//.error(
//"Tried to remove improperly initialized session. Skipping." +
//e);
}
}

Loading…
Cancel
Save