isPlayerguard refactored to derive from agenttype.

This commit is contained in:
2023-08-31 08:13:37 -04:00
parent c8ed04aaaf
commit 1ac76cfcd8
4 changed files with 23 additions and 24 deletions
+3 -3
View File
@@ -308,7 +308,7 @@ public class MobAI {
if (mob == null)
return false;
if(mob.isPlayerGuard == true){
if (mob.isPlayerGuard() == true) {
int contractID;
@@ -317,7 +317,7 @@ public class MobAI {
else
contractID = mob.contract.getContractID();
if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false)
if (Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false)
return false;
}
@@ -606,7 +606,7 @@ public class MobAI {
//override for guards
if (mob.despawned && mob.isPlayerGuard) {
if (mob.despawned && mob.isPlayerGuard()) {
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion)) {
if (mob.guardCaptain.isAlive() == false || ((Mob) mob.guardCaptain).despawned == true) {