added default behaviourType to "Simple" for mobs. added respawn logic

This commit is contained in:
2023-04-14 19:20:12 -05:00
parent 98f0928a4b
commit f9205eb4e2
2 changed files with 15 additions and 5 deletions
+6 -2
View File
@@ -293,7 +293,11 @@ public class Mob extends AbstractIntelligenceAgent {
this.equipmentSetID = this.contract.getEquipmentSet();
this.nameOverride = rs.getString("mob_name");
this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm"));
if(rs.getString("fsm").length() > 1) {
this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm"));
} else{
this.BehaviourType = MobileFSM.MobBehaviourType.Simple;
}
} catch (Exception e) {
Logger.error(currentID + "");
}
@@ -1299,7 +1303,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.walkMode = true;
this.combatTarget = null;
this.isAlive.set(true);
this.deathTime = 0;
this.lastBindLoc = this.bindLoc;
this.bindLoc = this.lastBindLoc;
this.setLoc(this.lastBindLoc);