|
|
@ -179,6 +179,7 @@ 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(); |
|
|
|
|
|
|
|
|
|
|
|
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) { |
|
|
|
|
|
|
|
|
|
|
@ -195,10 +196,13 @@ public enum LootManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(outItem.getPrefix() != null && outItem.getPrefix().isEmpty() == false) |
|
|
|
|
|
|
|
|
|
|
|
if (outItem.getPrefix() != null && outItem.getPrefix().isEmpty() == false) |
|
|
|
outItem.setIsID(false); |
|
|
|
outItem.setIsID(false); |
|
|
|
if(outItem.getSuffix() != null && outItem.getSuffix().isEmpty() == false) |
|
|
|
|
|
|
|
|
|
|
|
if (outItem.getSuffix() != null && outItem.getSuffix().isEmpty() == false) |
|
|
|
outItem.setIsID(false); |
|
|
|
outItem.setIsID(false); |
|
|
|
|
|
|
|
|
|
|
|
return outItem; |
|
|
|
return outItem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -267,7 +271,6 @@ public enum LootManager { |
|
|
|
inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, false); |
|
|
|
inItem.addPermanentEnchantment(suffixMod.action, 0, suffixMod.level, false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//}
|
|
|
|
|
|
|
|
return inItem; |
|
|
|
return inItem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -326,6 +329,7 @@ public enum LootManager { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
MobLoot toAdd = getGenTableItem(tableID, mob, inHotzone); |
|
|
|
MobLoot toAdd = getGenTableItem(tableID, mob, inHotzone); |
|
|
|
|
|
|
|
|
|
|
|
if (toAdd != null) |
|
|
|
if (toAdd != null) |
|
|
|
mob.getCharItemManager().addItemToInventory(toAdd); |
|
|
|
mob.getCharItemManager().addItemToInventory(toAdd); |
|
|
|
|
|
|
|
|
|
|
@ -355,7 +359,7 @@ public enum LootManager { |
|
|
|
|
|
|
|
|
|
|
|
if (ml != null) { |
|
|
|
if (ml != null) { |
|
|
|
ml.setIsID(true); |
|
|
|
ml.setIsID(true); |
|
|
|
ml.setDurabilityCurrent((short)(ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1)); |
|
|
|
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1)); |
|
|
|
mob.getCharItemManager().addItemToInventory(ml); |
|
|
|
mob.getCharItemManager().addItemToInventory(ml); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|