Minor cleanup

This commit is contained in:
2024-04-14 12:41:16 -04:00
parent eed25d8c16
commit 74e97fb435
+6 -10
View File
@@ -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 {
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 {
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 {
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 {
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;