From 2f4b675a2ce361fe8564d9ebb231c8fead55b56e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 17 Apr 2023 19:15:08 -0500 Subject: [PATCH] added mob fsm data to mob --- src/engine/objects/Mob.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index e32d550f..5d452b02 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -297,6 +297,9 @@ public class Mob extends AbstractIntelligenceAgent { this.equipmentSetID = this.contract.getEquipmentSet(); this.nameOverride = rs.getString("mob_name"); + if(rs.getString("fsm").length() > 1){ + this.BehaviourType = Enum.MobBehaviourType.valueOf(rs.getString("fsm")); + } } catch (Exception e) { Logger.error(currentID + ""); } @@ -1994,7 +1997,9 @@ public class Mob extends AbstractIntelligenceAgent { this.patrolPoints.add(newPatrolPoint); } } - this.BehaviourType = this.getMobBase().fsm; + if(this.BehaviourType == null) { + this.BehaviourType = this.getMobBase().fsm; + } if(this.isPlayerGuard() && this.contract != null){ this.BehaviourType = Enum.MobBehaviourType.GuardCaptain; }