forked from MagicBane/Server
usage of AIAgentType for default patrol points
This commit is contained in:
@@ -2879,6 +2879,8 @@ public class Enum {
|
|||||||
MOBILE,
|
MOBILE,
|
||||||
PET,
|
PET,
|
||||||
CHARMED,
|
CHARMED,
|
||||||
|
|
||||||
|
SIEGEENGINE,
|
||||||
GUARD;
|
GUARD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
private int currentID;
|
private int currentID;
|
||||||
|
|
||||||
|
//TODO implement feared object system
|
||||||
public AbstractWorldObject fearedObject = null;
|
public AbstractWorldObject fearedObject = null;
|
||||||
private long lastAttackTime = 0;
|
private long lastAttackTime = 0;
|
||||||
private int lastMobPowerToken = 0;
|
private int lastMobPowerToken = 0;
|
||||||
@@ -87,6 +88,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
this.currentID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET;
|
this.currentID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET;
|
||||||
this.bindLoc = Vector3fImmutable.ZERO;
|
this.bindLoc = Vector3fImmutable.ZERO;
|
||||||
this.gridObjectType = GridObjectType.DYNAMIC;
|
this.gridObjectType = GridObjectType.DYNAMIC;
|
||||||
|
this.agentType = AIAgentType.MOBILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -153,6 +155,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
this.currentID = this.dbID;
|
this.currentID = this.dbID;
|
||||||
|
|
||||||
|
this.agentType = AIAgentType.MOBILE;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(e + " " + this.dbID);
|
Logger.error(e + " " + this.dbID);
|
||||||
}
|
}
|
||||||
@@ -429,6 +432,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
Mob mob;
|
Mob mob;
|
||||||
|
|
||||||
|
mobile.agentType = AIAgentType.GUARD;
|
||||||
try {
|
try {
|
||||||
mob = DbManager.MobQueries.PERSIST(mobile);
|
mob = DbManager.MobQueries.PERSIST(mobile);
|
||||||
|
|
||||||
@@ -518,6 +522,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
siegeMinion.guardCaptain = artyCaptain;
|
siegeMinion.guardCaptain = artyCaptain;
|
||||||
siegeMinion.parentZoneUUID = artyCaptain.parentZoneUUID;
|
siegeMinion.parentZoneUUID = artyCaptain.parentZoneUUID;
|
||||||
siegeMinion.behaviourType = MobBehaviourType.SiegeEngine;
|
siegeMinion.behaviourType = MobBehaviourType.SiegeEngine;
|
||||||
|
siegeMinion.agentType = AIAgentType.SIEGEENGINE;
|
||||||
siegeMinion.bindLoc = Vector3fImmutable.ZERO;
|
siegeMinion.bindLoc = Vector3fImmutable.ZERO;
|
||||||
//siegeMinion.spawnTime = (60 * 15);
|
//siegeMinion.spawnTime = (60 * 15);
|
||||||
siegeMinion.spawnTime = 15;
|
siegeMinion.spawnTime = 15;
|
||||||
@@ -1715,7 +1720,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
|
|
||||||
//assign 5 random patrol points for regular mobs
|
//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);
|
NPCManager.AssignPatrolPoints(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user