usage of AIAgentType for default patrol points

This commit is contained in:
2023-08-29 21:17:44 -05:00
parent 69fdddfc71
commit 5c3c552288
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -2879,6 +2879,8 @@ public class Enum {
MOBILE,
PET,
CHARMED,
SIEGEENGINE,
GUARD;
}
}
+6 -1
View File
@@ -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);
}