no more spamming console
This commit is contained in:
@@ -321,20 +321,20 @@ public class MobAI {
|
|||||||
if (mob == null)
|
if (mob == null)
|
||||||
return false;
|
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();
|
contractID = mob.npcOwner.contract.getContractID();
|
||||||
else
|
else if(mob.contract != null)
|
||||||
contractID = mob.contract.getContractID();
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mob.mobPowers.isEmpty())
|
if (mob.mobPowers == null || mob.mobPowers.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) {
|
if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) {
|
||||||
|
|||||||
@@ -227,10 +227,10 @@ public class ClientConnection extends AbstractConnection {
|
|||||||
SessionManager.remSession(
|
SessionManager.remSession(
|
||||||
SessionManager.getSession(sessionID));
|
SessionManager.getSession(sessionID));
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
Logger
|
//Logger
|
||||||
.error(
|
//.error(
|
||||||
"Tried to remove improperly initialized session. Skipping." +
|
//"Tried to remove improperly initialized session. Skipping." +
|
||||||
e);
|
//e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user