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