Browse Source

added none to behaviour type for mobs and defuated RS constructor for mobs

master
FatBoy-DOTC 2 years ago
parent
commit
98eb557c58
  1. 5
      src/engine/ai/MobileFSM.java
  2. 2
      src/engine/objects/Mob.java

5
src/engine/ai/MobileFSM.java

@ -59,7 +59,8 @@ public class MobileFSM { @@ -59,7 +59,8 @@ public class MobileFSM {
Pet1(null, false, false, false, false, false),
Simple(null, false, false, true, false, false),
Helpee(null, false, true, true, false, true),
HelpeeWimpy(null, true, false, true, false, false);
HelpeeWimpy(null, true, false, true, false, false),
None(null, false, false, false, false, false);
private static HashMap<Integer, MobBehaviourType> _behaviourTypes = new HashMap<>();
public MobBehaviourType BehaviourHelperType;
@ -565,7 +566,7 @@ public class MobileFSM { @@ -565,7 +566,7 @@ public class MobileFSM {
}
}
public static void run(Mob mob) {
if (mob == null) {
if (mob == null || mob.BehaviourType == MobBehaviourType.None) {
return;
}
//add default behaviour type

2
src/engine/objects/Mob.java

@ -296,7 +296,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -296,7 +296,7 @@ public class Mob extends AbstractIntelligenceAgent {
if(rs.getString("fsm").length() > 1) {
this.BehaviourType = MobileFSM.MobBehaviourType.valueOf(rs.getString("fsm"));
} else{
this.BehaviourType = MobileFSM.MobBehaviourType.Simple;
this.BehaviourType = MobileFSM.MobBehaviourType.None;
}
} catch (Exception e) {
Logger.error(currentID + "");

Loading…
Cancel
Save