pet AI implemented

This commit is contained in:
2023-04-15 22:04:55 -05:00
parent ca40d7a71d
commit cfa59d8012
4 changed files with 101 additions and 62 deletions
+7 -3
View File
@@ -181,6 +181,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.parentZone = parent;
this.parentZoneID = (parent != null) ? parent.getObjectUUID() : 0;
this.ownerUID = owner.getObjectUUID();
this.BehaviourType = MobileFSM.MobBehaviourType.Pet1;
initializeMob(true, false, false);
clearStatic();
}
@@ -1955,10 +1956,13 @@ public class Mob extends AbstractIntelligenceAgent {
}
// Combine mobbase and mob aggro arrays into one bitvector
try {
this.notEnemy.addAll(this.getMobBase().notEnemy);
this.enemy.addAll(this.getMobBase().enemy);
}
catch(Exception ex){
this.notEnemy.addAll(this.getMobBase().notEnemy);
this.enemy.addAll(this.getMobBase().enemy);
}
try {
NPCManager.applyRuneSetEffects(this);
recalculateStats();