diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index e7bd9d1e..bf651403 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -375,13 +375,18 @@ public enum LootManager { } MobLoot ml = new MobLoot(mob, genericIB, false); - if (ml != null && dropCount < 1) { + if (ml != null && dropCount < 1 && genericIB.isVorg() == false) { ml.setIsID(true); ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1)); mob.getCharItemManager().addItemToInventory(ml); dropCount = 1; //break; // Exit on first successful roll. } + if(ml != null && genericIB.isVorg()){ + ml.setIsID(true); + ml.setDurabilityCurrent(ml.getDurabilityMax()); + mob.getCharItemManager().addItemToInventory(ml); + } } } diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index b70774a5..99fdefd3 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -96,7 +96,8 @@ public class Item extends AbstractWorldObject { this.customName = name; loadEnchantments(); - bakeInStats(); + if(this.getItemBase().isVorg() == false) + bakeInStats(); } public Item(ItemBase itemBase, int ownerID, @@ -1232,15 +1233,6 @@ public class Item extends AbstractWorldObject { return; if (this.getItemBase() != null) - if(this.getItemBase().isVorg()){ - this.getEnchants().clear(); - for(String powerString : this.getItemBase().getVorgStats()){ - //AbstractPowerAction apa = PowersManager.getPowerActionByIDString(powerString); - //apa.applyBakedInStatsForItem(this, 0); - this.addPermanentEnchantment(powerString,0); - } - this.setName(this.getItemBase().getName()); - }else { for (Integer token : this.getItemBase().getBakedInStats().keySet()) { effect = PowersManager.getEffectByToken(token); @@ -1253,7 +1245,6 @@ public class Item extends AbstractWorldObject { apa.applyBakedInStatsForItem(this, this.getItemBase().getBakedInStats().get(token)); } - } } public final void loadEnchantments() { diff --git a/src/engine/objects/MobLoot.java b/src/engine/objects/MobLoot.java index 235eccd1..af7970a1 100644 --- a/src/engine/objects/MobLoot.java +++ b/src/engine/objects/MobLoot.java @@ -164,6 +164,13 @@ public final class MobLoot extends Item { item.addPermanentEnchantment(this.suffix, 0); this.junk(); + if (item.getItemBase().isVorg()) { + item.getEnchants().clear(); + for (String powerString : item.getItemBase().getVorgStats()) { + item.addPermanentEnchantment(powerString, 0); + } + this.setName(item.getItemBase().getName()); + } return item; }