diff --git a/src/engine/Enum.java b/src/engine/Enum.java index d9d2527b..aec9e3c6 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -2879,6 +2879,8 @@ public class Enum { MOBILE, PET, CHARMED, + + SIEGEENGINE, GUARD; } } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 97acd7ee..1af15ce8 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -71,6 +71,7 @@ public class Mob extends AbstractIntelligenceAgent { private int currentID; + //TODO implement feared object system public AbstractWorldObject fearedObject = null; private long lastAttackTime = 0; private int lastMobPowerToken = 0; @@ -87,6 +88,7 @@ public class Mob extends AbstractIntelligenceAgent { this.currentID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; this.bindLoc = Vector3fImmutable.ZERO; this.gridObjectType = GridObjectType.DYNAMIC; + this.agentType = AIAgentType.MOBILE; } @@ -153,6 +155,7 @@ public class Mob extends AbstractIntelligenceAgent { this.currentID = this.dbID; + this.agentType = AIAgentType.MOBILE; } catch (Exception e) { Logger.error(e + " " + this.dbID); } @@ -429,6 +432,7 @@ public class Mob extends AbstractIntelligenceAgent { Mob mob; + mobile.agentType = AIAgentType.GUARD; try { mob = DbManager.MobQueries.PERSIST(mobile); @@ -518,6 +522,7 @@ public class Mob extends AbstractIntelligenceAgent { siegeMinion.guardCaptain = artyCaptain; siegeMinion.parentZoneUUID = artyCaptain.parentZoneUUID; siegeMinion.behaviourType = MobBehaviourType.SiegeEngine; + siegeMinion.agentType = AIAgentType.SIEGEENGINE; siegeMinion.bindLoc = Vector3fImmutable.ZERO; //siegeMinion.spawnTime = (60 * 15); siegeMinion.spawnTime = 15; @@ -1715,7 +1720,7 @@ public class Mob extends AbstractIntelligenceAgent { //assign 5 random patrol points for regular mobs - if (this.guardCaptain == null && this.isPlayerGuard == false && !isPet() == false && isNecroPet() == false) { + if (this.agentType.equals(AIAgentType.MOBILE)) { NPCManager.AssignPatrolPoints(this); }