From ae968211ab6c77f62b1a692a0dce7731275077be Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 22 Apr 2023 18:13:29 -0500 Subject: [PATCH] none to enum MonsterType --- src/engine/Enum.java | 1 + src/engine/objects/Mob.java | 1 - src/engine/objects/MobBase.java | 8 +------- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/engine/Enum.java b/src/engine/Enum.java index 89b0f995..dd92087e 100644 --- a/src/engine/Enum.java +++ b/src/engine/Enum.java @@ -50,6 +50,7 @@ public class Enum { } public enum MonsterType implements EnumBitSetHelper { + None, Aelfborn, All, Animal, diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index e08631ff..a07bfdc2 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1720,7 +1720,6 @@ public class Mob extends AbstractIntelligenceAgent { } // Combine mobbase and mob aggro arrays into one bitvector - EnumBitSet notEnemyTester = this.getMobBase().notEnemy; this.notEnemy.addAll(this.getMobBase().notEnemy); this.enemy.addAll(this.getMobBase().enemy); diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index a479308f..c6219f71 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -108,14 +108,8 @@ public class MobBase extends AbstractGameObject { this.maxGold = 30; } - this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.class); - if(rs.getLong("notEnemy") == 0) - this.notEnemy = EnumBitSet.noneOf(Enum.MonsterType.class); - else + this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), Enum.MobFlagType.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.seeInvis = rs.getInt("seeInvis");