Enum moved to Enum.

Updated logic in rs constructor to handle blanks properly.
This commit is contained in:
2023-04-17 07:20:39 -04:00
parent 6e92836deb
commit 662d1d2b85
5 changed files with 72 additions and 63 deletions
+3 -3
View File
@@ -105,7 +105,7 @@ public class Mob extends AbstractIntelligenceAgent {
public EnumBitSet<MonsterType> notEnemy;
public EnumBitSet<Enum.MonsterType> enemy;
public MobileFSM.MobBehaviourType BehaviourType;
public MobBehaviourType BehaviourType;
public ArrayList<Vector3fImmutable> patrolPoints;
public int lastPatrolPointIndex = 0;
public long stopPatrolTime = 0;
@@ -184,7 +184,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;
this.BehaviourType = Enum.MobBehaviourType.Pet1;
initializeMob(true, false, false);
clearStatic();
}
@@ -1996,7 +1996,7 @@ public class Mob extends AbstractIntelligenceAgent {
}
this.BehaviourType = this.getMobBase().fsm;
if(this.isPlayerGuard() && this.contract != null){
this.BehaviourType = MobileFSM.MobBehaviourType.GuardCaptain;
this.BehaviourType = Enum.MobBehaviourType.GuardCaptain;
}
} catch (Exception e) {
Logger.error(e.getMessage());
+2 -3
View File
@@ -11,7 +11,6 @@ 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;
@@ -61,7 +60,7 @@ public class MobBase extends AbstractGameObject {
private float walkCombat = 0;
private float runCombat = 0;
public int bootySet;
public MobileFSM.MobBehaviourType fsm;
public Enum.MobBehaviourType fsm;
public EnumBitSet<Enum.MonsterType> notEnemy;
public EnumBitSet<Enum.MonsterType> enemy;
@@ -90,7 +89,7 @@ public class MobBase extends AbstractGameObject {
this.defenseRating = rs.getInt("defense");
this.attackRange = rs.getFloat("attackRange");
this.bootySet = rs.getInt("bootySet");
this.fsm = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm"));
this.fsm = Enum.MobBehaviourType.getByName(rs.getString("fsm"));
if (MobbaseGoldEntry.MobbaseGoldMap.containsKey(this.loadID)){
MobbaseGoldEntry goldEntry = MobbaseGoldEntry.MobbaseGoldMap.get(this.loadID);