|
|
@ -9,7 +9,6 @@ |
|
|
|
|
|
|
|
|
|
|
|
package engine.objects; |
|
|
|
package engine.objects; |
|
|
|
|
|
|
|
|
|
|
|
import ch.claude_martin.enumbitset.EnumBitSet; |
|
|
|
|
|
|
|
import engine.gameManager.DbManager; |
|
|
|
import engine.gameManager.DbManager; |
|
|
|
import engine.gameManager.LootManager; |
|
|
|
import engine.gameManager.LootManager; |
|
|
|
import engine.loot.BootySetEntry; |
|
|
|
import engine.loot.BootySetEntry; |
|
|
@ -39,7 +38,7 @@ public class MobBase extends AbstractGameObject { |
|
|
|
private float damageMin; |
|
|
|
private float damageMin; |
|
|
|
private float damageMax; |
|
|
|
private float damageMax; |
|
|
|
private float hitBoxRadius; |
|
|
|
private float hitBoxRadius; |
|
|
|
private EnumBitSet<mbEnums.MobFlagType> flags; |
|
|
|
private EnumSet<mbEnums.MobFlagType> flags; |
|
|
|
private int mask; |
|
|
|
private int mask; |
|
|
|
private int goldMod; |
|
|
|
private int goldMod; |
|
|
|
private int seeInvis; |
|
|
|
private int seeInvis; |
|
|
@ -77,7 +76,7 @@ public class MobBase extends AbstractGameObject { |
|
|
|
|
|
|
|
|
|
|
|
this.fsm = mbEnums.MobBehaviourType.valueOf(rs.getString("fsm")); |
|
|
|
this.fsm = mbEnums.MobBehaviourType.valueOf(rs.getString("fsm")); |
|
|
|
|
|
|
|
|
|
|
|
this.flags = EnumBitSet.asEnumBitSet(rs.getLong("flags"), mbEnums.MobFlagType.class); |
|
|
|
this.flags = mbEnums.fromLong(rs.getLong("flags"), mbEnums.MobFlagType.class); |
|
|
|
this.notEnemy = mbEnums.fromLong(rs.getLong("notEnemy"), mbEnums.MonsterType.class); |
|
|
|
this.notEnemy = mbEnums.fromLong(rs.getLong("notEnemy"), mbEnums.MonsterType.class); |
|
|
|
this.enemy = mbEnums.fromLong(rs.getLong("enemy"), mbEnums.MonsterType.class); |
|
|
|
this.enemy = mbEnums.fromLong(rs.getLong("enemy"), mbEnums.MonsterType.class); |
|
|
|
|
|
|
|
|
|
|
@ -89,19 +88,19 @@ public class MobBase extends AbstractGameObject { |
|
|
|
if (this.getObjectUUID() == 12021 || this.getObjectUUID() == 12022) |
|
|
|
if (this.getObjectUUID() == 12021 || this.getObjectUUID() == 12022) |
|
|
|
this.isNecroPet = true; |
|
|
|
this.isNecroPet = true; |
|
|
|
|
|
|
|
|
|
|
|
if (mbEnums.MobFlagType.HUMANOID.elementOf(this.flags)) |
|
|
|
if (this.flags.contains(mbEnums.MobFlagType.HUMANOID)) |
|
|
|
this.mask += MBServerStatics.MASK_HUMANOID; |
|
|
|
this.mask += MBServerStatics.MASK_HUMANOID; |
|
|
|
|
|
|
|
|
|
|
|
if (mbEnums.MobFlagType.UNDEAD.elementOf(this.flags)) |
|
|
|
if (this.flags.contains(mbEnums.MobFlagType.UNDEAD)) |
|
|
|
this.mask += MBServerStatics.MASK_UNDEAD; |
|
|
|
this.mask += MBServerStatics.MASK_UNDEAD; |
|
|
|
|
|
|
|
|
|
|
|
if (mbEnums.MobFlagType.BEAST.elementOf(this.flags)) |
|
|
|
if (this.flags.contains(mbEnums.MobFlagType.BEAST)) |
|
|
|
this.mask += MBServerStatics.MASK_BEAST; |
|
|
|
this.mask += MBServerStatics.MASK_BEAST; |
|
|
|
|
|
|
|
|
|
|
|
if (mbEnums.MobFlagType.DRAGON.elementOf(this.flags)) |
|
|
|
if (this.flags.contains(mbEnums.MobFlagType.DRAGON)) |
|
|
|
this.mask += MBServerStatics.MASK_DRAGON; |
|
|
|
this.mask += MBServerStatics.MASK_DRAGON; |
|
|
|
|
|
|
|
|
|
|
|
if (mbEnums.MobFlagType.RAT.elementOf(this.flags)) |
|
|
|
if (this.flags.contains(mbEnums.MobFlagType.RAT)) |
|
|
|
this.mask += MBServerStatics.MASK_RAT; |
|
|
|
this.mask += MBServerStatics.MASK_RAT; |
|
|
|
|
|
|
|
|
|
|
|
this.mobBaseStats = DbManager.MobBaseQueries.LOAD_STATS(this.loadID); |
|
|
|
this.mobBaseStats = DbManager.MobBaseQueries.LOAD_STATS(this.loadID); |
|
|
@ -204,7 +203,7 @@ public class MobBase extends AbstractGameObject { |
|
|
|
return this.defenseRating; |
|
|
|
return this.defenseRating; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public EnumBitSet<mbEnums.MobFlagType> getFlags() { |
|
|
|
public EnumSet<mbEnums.MobFlagType> getFlags() { |
|
|
|
return this.flags; |
|
|
|
return this.flags; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|