Browse Source

Minor cleanup

combat-2
MagicBot 7 months ago
parent
commit
74e97fb435
  1. 16
      src/engine/gameManager/LootManager.java

16
src/engine/gameManager/LootManager.java

@ -212,7 +212,7 @@ public enum LootManager { @@ -212,7 +212,7 @@ public enum LootManager {
int prefixTableRoll = 0;
if (mob.getObjectType().ordinal() == 52)
if (mob.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))
prefixTableRoll = ThreadLocalRandom.current().nextInt(1, 320 + 1);
else
prefixTableRoll = TableRoll(mob.level, inHotzone);
@ -222,7 +222,7 @@ public enum LootManager { @@ -222,7 +222,7 @@ public enum LootManager {
if (prefixMod == null)
return inItem;
if (prefixMod.action.length() > 0) {
if (prefixMod.action.isEmpty() == false) {
inItem.setPrefix(prefixMod.action);
inItem.addPermanentEnchantment(prefixMod.action, 0, prefixMod.level, true);
}
@ -246,7 +246,7 @@ public enum LootManager { @@ -246,7 +246,7 @@ public enum LootManager {
int suffixTableRoll;
if (mob.getObjectType().ordinal() == 52)
if (mob.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))
suffixTableRoll = ThreadLocalRandom.current().nextInt(1, 320 + 1);
else
suffixTableRoll = TableRoll(mob.level, inHotzone);
@ -256,7 +256,7 @@ public enum LootManager { @@ -256,7 +256,7 @@ public enum LootManager {
if (suffixMod == null)
return inItem;
if (suffixMod.action.length() > 0) {
if (suffixMod.action.isEmpty() == false) {
inItem.setSuffix(suffixMod.action);
inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, false);
}
@ -270,14 +270,10 @@ public enum LootManager { @@ -270,14 +270,10 @@ public enum LootManager {
mobLevel = 65;
int max = (int) (4.882 * mobLevel + 127.0);
if (max > 319)
max = 319;
int min = (int) (4.469 * mobLevel - 3.469);
if (min < 70)
min = 70;
min = Math.max(min, 70);
max = Math.min(max, 319);
if (inHotzone)
min += mobLevel;

Loading…
Cancel
Save