From f855ec9a191c74289df3ff112916a112e68ab59a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Apr 2023 19:50:59 -0500 Subject: [PATCH] fsm lookup changes --- src/engine/objects/Mob.java | 2 +- src/engine/objects/MobBase.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index be4e18a4..c4964a78 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1987,7 +1987,7 @@ public class Mob extends AbstractIntelligenceAgent { this.patrolPoints.add(newPatrolPoint); } } - this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(getMobBase().fsm); + this.BehaviourType = this.getMobBase().fsm; } catch (Exception e) { Logger.error(e.getMessage()); } diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index 1a905cd0..d016a145 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -11,6 +11,7 @@ package engine.objects; import ch.claude_martin.enumbitset.EnumBitSet; import engine.Enum; +import engine.ai.MobileFSM; import engine.gameManager.DbManager; import engine.gameManager.NPCManager; import engine.server.MBServerStatics; @@ -60,7 +61,7 @@ public class MobBase extends AbstractGameObject { private float walkCombat = 0; private float runCombat = 0; public int bootySet; - public String fsm = ""; + public MobileFSM.MobBehaviourType fsm; public EnumBitSet notEnemy; public EnumBitSet enemy; @@ -89,7 +90,7 @@ public class MobBase extends AbstractGameObject { this.defenseRating = rs.getInt("defense"); this.attackRange = rs.getFloat("attackRange"); this.bootySet = rs.getInt("bootySet"); - this.fsm = rs.getString("fsm"); + this.fsm = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm")); if (MobbaseGoldEntry.MobbaseGoldMap.containsKey(this.loadID)){ MobbaseGoldEntry goldEntry = MobbaseGoldEntry.MobbaseGoldMap.get(this.loadID);