fsm lookup changes

This commit is contained in:
2023-04-16 19:50:59 -05:00
parent 6817c3dffe
commit f855ec9a19
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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());
}
+3 -2
View File
@@ -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<Enum.MonsterType> notEnemy;
public EnumBitSet<Enum.MonsterType> 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);