none to enum MonsterType

This commit is contained in:
2023-04-22 18:13:29 -05:00
parent a3170bfb4b
commit ae968211ab
3 changed files with 2 additions and 8 deletions
+1
View File
@@ -50,6 +50,7 @@ public class Enum {
} }
public enum MonsterType implements EnumBitSetHelper<MonsterType> { public enum MonsterType implements EnumBitSetHelper<MonsterType> {
None,
Aelfborn, Aelfborn,
All, All,
Animal, Animal,
-1
View File
@@ -1720,7 +1720,6 @@ public class Mob extends AbstractIntelligenceAgent {
} }
// Combine mobbase and mob aggro arrays into one bitvector // Combine mobbase and mob aggro arrays into one bitvector
EnumBitSet<Enum.MonsterType> notEnemyTester = this.getMobBase().notEnemy;
this.notEnemy.addAll(this.getMobBase().notEnemy); this.notEnemy.addAll(this.getMobBase().notEnemy);
this.enemy.addAll(this.getMobBase().enemy); this.enemy.addAll(this.getMobBase().enemy);
+1 -7
View File
@@ -108,14 +108,8 @@ public class MobBase extends AbstractGameObject {
this.maxGold = 30; this.maxGold = 30;
} }
this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class); this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class);
if(rs.getLong("notEnemy") == 0)
this.notEnemy = EnumBitSet.noneOf(Enum.MonsterType.class);
else
this.notEnemy = EnumBitSet.asEnumBitSet(rs.getLong("notEnemy"), Enum.MonsterType.class); 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.enemy = EnumBitSet.asEnumBitSet(rs.getLong("enemy"), Enum.MonsterType.class);
this.seeInvis = rs.getInt("seeInvis"); this.seeInvis = rs.getInt("seeInvis");