added mob fsm data to mob

This commit is contained in:
2023-04-17 19:15:08 -05:00
parent 662d1d2b85
commit 2f4b675a2c
+6 -1
View File
@@ -297,6 +297,9 @@ public class Mob extends AbstractIntelligenceAgent {
this.equipmentSetID = this.contract.getEquipmentSet(); this.equipmentSetID = this.contract.getEquipmentSet();
this.nameOverride = rs.getString("mob_name"); this.nameOverride = rs.getString("mob_name");
if(rs.getString("fsm").length() > 1){
this.BehaviourType = Enum.MobBehaviourType.valueOf(rs.getString("fsm"));
}
} catch (Exception e) { } catch (Exception e) {
Logger.error(currentID + ""); Logger.error(currentID + "");
} }
@@ -1994,7 +1997,9 @@ public class Mob extends AbstractIntelligenceAgent {
this.patrolPoints.add(newPatrolPoint); this.patrolPoints.add(newPatrolPoint);
} }
} }
this.BehaviourType = this.getMobBase().fsm; if(this.BehaviourType == null) {
this.BehaviourType = this.getMobBase().fsm;
}
if(this.isPlayerGuard() && this.contract != null){ if(this.isPlayerGuard() && this.contract != null){
this.BehaviourType = Enum.MobBehaviourType.GuardCaptain; this.BehaviourType = Enum.MobBehaviourType.GuardCaptain;
} }