diff --git a/src/engine/Enum.java b/src/engine/Enum.java index dd92087e..89b0f995 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -50,7 +50,6 @@ public class Enum { } public enum MonsterType implements EnumBitSetHelper { - None, Aelfborn, All, Animal, diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index 9182cb78..a479308f 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -109,9 +109,14 @@ public class MobBase extends AbstractGameObject { } this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class); - - this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class); - this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class); + if(rs.getLong("notEnemy") == 0) + this.notEnemy = EnumBitSet.noneOf(Enum.MonsterType.class); + else + this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class); + if(rs.getLong("enemy") == 0) + this.enemy = EnumBitSet.noneOf(Enum.MonsterType.class); + else + this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class); this.seeInvis = rs.getInt("seeInvis"); this.scale = rs.getFloat("scale");