From 2827db5db57b2935869d3de5937e54b274530cf9 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 7 Apr 2023 13:56:28 -0500 Subject: [PATCH] prefix/suffix usage for mob loot --- src/engine/loot/LootManager.java | 4 ++-- src/engine/objects/MobLoot.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/loot/LootManager.java b/src/engine/loot/LootManager.java index 99f6f322..74c9a825 100644 --- a/src/engine/loot/LootManager.java +++ b/src/engine/loot/LootManager.java @@ -140,11 +140,11 @@ public class LootManager { outItem = new MobLoot(mob, ItemBase.getItemBase(itemUUID), false); String prefixAction = prefixMod.action; if(prefixMod.action.length() > 0){ - outItem.addPermanentEnchantment(prefixMod.action, prefixMod.level); + outItem.setPrefix(prefixMod.action); } String suffixaction = suffixMod.action; if(suffixMod.action.length() > 0){ - outItem.addPermanentEnchantment(suffixMod.action, suffixMod.level); + outItem.setSuffix(suffixMod.action); } return outItem; } diff --git a/src/engine/objects/MobLoot.java b/src/engine/objects/MobLoot.java index 4f192888..bfd3fa43 100644 --- a/src/engine/objects/MobLoot.java +++ b/src/engine/objects/MobLoot.java @@ -103,7 +103,7 @@ public final class MobLoot extends Item { return null; - Item item = this; + Item item = (Item)this; item.setOwner(looter); //item.setIsID(false);