forked from MagicBane/Server
moved fsm lookup to runAfterLoad
This commit is contained in:
@@ -298,12 +298,6 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
this.equipmentSetID = this.contract.getEquipmentSet();
|
this.equipmentSetID = this.contract.getEquipmentSet();
|
||||||
|
|
||||||
this.nameOverride = rs.getString("mob_name");
|
this.nameOverride = rs.getString("mob_name");
|
||||||
if (this.getMobBase().fsm.length() > 1) {
|
|
||||||
this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm"));
|
|
||||||
} else {
|
|
||||||
this.BehaviourType = MobileFSM.MobBehaviourType.None;
|
|
||||||
Logger.error(this.getName() + " with UUID: " + this.getObjectUUID() + " failed to load a MobBehaviourType");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(currentID + "");
|
Logger.error(currentID + "");
|
||||||
}
|
}
|
||||||
@@ -1993,6 +1987,12 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
this.patrolPoints.add(newPatrolPoint);
|
this.patrolPoints.add(newPatrolPoint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.getMobBase().fsm.length() > 1) {
|
||||||
|
this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(getMobBase().fsm);
|
||||||
|
} else {
|
||||||
|
this.BehaviourType = MobileFSM.MobBehaviourType.None;
|
||||||
|
Logger.error(this.getName() + " with UUID: " + this.getObjectUUID() + " failed to load a MobBehaviourType");
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error(e.getMessage());
|
Logger.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user