diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index 11679641..2a2a4e0e 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -76,7 +76,6 @@ public class mbEnums { return enumSet; } - public static > String asString(EnumSet enumSet) { if (enumSet == null || enumSet.isEmpty()) @@ -135,7 +134,7 @@ public class mbEnums { SENTINEL, } - public enum MonsterType implements EnumBitSetHelper { + public enum MonsterType { Aelfborn, All, Animal, diff --git a/src/engine/objects/AbstractIntelligenceAgent.java b/src/engine/objects/AbstractIntelligenceAgent.java index c9431ee1..3198e014 100644 --- a/src/engine/objects/AbstractIntelligenceAgent.java +++ b/src/engine/objects/AbstractIntelligenceAgent.java @@ -9,7 +9,6 @@ package engine.objects; -import ch.claude_martin.enumbitset.EnumBitSet; import engine.InterestManagement.WorldGrid; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; @@ -26,6 +25,7 @@ import engine.server.MBServerStatics; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.EnumSet; public abstract class AbstractIntelligenceAgent extends AbstractCharacter { @@ -34,8 +34,8 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { public mbEnums.AIAgentType agentType = mbEnums.AIAgentType.MOBILE; public AbstractCharacter guardCaptain; - public EnumBitSet notEnemy = EnumBitSet.noneOf(mbEnums.MonsterType.class); - public EnumBitSet enemy = EnumBitSet.noneOf(mbEnums.MonsterType.class); + public EnumSet notEnemy = EnumSet.noneOf(mbEnums.MonsterType.class); + public EnumSet enemy = EnumSet.noneOf(mbEnums.MonsterType.class); ; public mbEnums.MobBehaviourType behaviourType; public ArrayList patrolPoints; diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index b8b274a7..ca4bc7f4 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -9,7 +9,6 @@ package engine.objects; -import ch.claude_martin.enumbitset.EnumBitSet; import engine.InterestManagement.WorldGrid; import engine.exception.SerializationException; import engine.gameManager.*; @@ -144,8 +143,8 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed { this.runeSet = rs.getInt("runeSet"); this.bootySet = rs.getInt("bootySet"); - this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), mbEnums.MonsterType.class); - this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), mbEnums.MonsterType.class); + this.notEnemy = mbEnums.fromLong(rs.getLong("notEnemy"), mbEnums.MonsterType.class); + this.enemy = mbEnums.fromLong(rs.getLong("enemy"), mbEnums.MonsterType.class); this.firstName = rs.getString("mob_name"); if (rs.getString("fsm").length() > 1) diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index 03e1cee4..0d68794b 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -19,6 +19,7 @@ import engine.server.MBServerStatics; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.EnumSet; import java.util.concurrent.ConcurrentHashMap; public class MobBase extends AbstractGameObject { @@ -30,8 +31,8 @@ public class MobBase extends AbstractGameObject { public final ArrayList effectsList; public int bootySet; public mbEnums.MobBehaviourType fsm; - public EnumBitSet notEnemy; - public EnumBitSet enemy; + public EnumSet notEnemy; + public EnumSet enemy; private float healthMax; private int attackRating; private int defenseRating; @@ -77,8 +78,8 @@ public class MobBase extends AbstractGameObject { this.fsm = mbEnums.MobBehaviourType.valueOf(rs.getString("fsm")); this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), mbEnums.MobFlagType.class); - this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), mbEnums.MonsterType.class); - this.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), mbEnums.MonsterType.class); + this.notEnemy = mbEnums.fromLong(rs.getLong("notEnemy"), mbEnums.MonsterType.class); + this.enemy = mbEnums.fromLong(rs.getLong("enemy"), mbEnums.MonsterType.class); this.seeInvis = rs.getInt("seeInvis"); this.scale = rs.getFloat("scale");