Browse Source

item identification defaults work

master
FatBoy-DOTC 1 year ago
parent
commit
91842add6d
  1. 6
      src/engine/gameManager/LootManager.java

6
src/engine/gameManager/LootManager.java

@ -182,8 +182,6 @@ public enum LootManager {
outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false); outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false);
Enum.ItemType outType = outItem.getItemBase().getType(); Enum.ItemType outType = outItem.getItemBase().getType();
outItem.setIsID(true);
if (outType.ordinal() == Enum.ItemType.WEAPON.ordinal() || outType.ordinal() == Enum.ItemType.ARMOR.ordinal() || outType.ordinal() == Enum.ItemType.JEWELRY.ordinal()) { if (outType.ordinal() == Enum.ItemType.WEAPON.ordinal() || outType.ordinal() == Enum.ItemType.ARMOR.ordinal() || outType.ordinal() == Enum.ItemType.JEWELRY.ordinal()) {
if (outItem.getItemBase().isGlass() == false) { if (outItem.getItemBase().isGlass() == false) {
@ -200,6 +198,8 @@ public enum LootManager {
} }
} }
} }
if(outItem.getPrefix() != null && outItem.getPrefix().isEmpty() == false && outItem.getSuffix() != null && outItem.getSuffix().isEmpty() == false)
outItem.setIsID(false);
return outItem; return outItem;
} }
@ -236,7 +236,6 @@ public enum LootManager {
if (prefixMod != null && prefixMod.action.length() > 0) { if (prefixMod != null && prefixMod.action.length() > 0) {
inItem.setPrefix(prefixMod.action); inItem.setPrefix(prefixMod.action);
inItem.addPermanentEnchantment(prefixMod.action, 0, prefixMod.level, true); inItem.addPermanentEnchantment(prefixMod.action, 0, prefixMod.level, true);
inItem.setIsID(false);
} }
} }
//} //}
@ -277,7 +276,6 @@ public enum LootManager {
if (suffixMod != null && suffixMod.action.length() > 0) { if (suffixMod != null && suffixMod.action.length() > 0) {
inItem.setSuffix(suffixMod.action); inItem.setSuffix(suffixMod.action);
inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, false); inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, false);
inItem.setIsID(false);
} }
} }
//} //}

Loading…
Cancel
Save