diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index cb141b68..5b65c6ce 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -166,9 +166,12 @@ public class MobAI { try { + if(mob == null || target == null) + return; + if (target.getRank() == -1 || !target.isVulnerable() || BuildingManager.getBuildingFromCache(target.getObjectUUID()) == null) { mob.setCombatTarget(null); - return; + return; } City playercity = ZoneManager.getCityAtLocation(mob.getLoc()); diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index 5b98aaa4..d80ef89f 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -266,6 +266,10 @@ public final class Bane { BaneRecord baneRecord = BaneRecord.borrow(bane, Enum.RecordEventType.PENDING); DataWarehouse.pushToWarehouse(baneRecord); + + //add bane commander NPC + int contractID = 1502042; + NPC.createNPC("Bane Commander",contractID,Vector3fImmutable.getRandomPointOnCircle(stone.loc,15),targetCity.getGuild(),cityZone,(short)70,stone); return true; }