diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index 754d94ce..baad0c58 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -39,8 +39,8 @@ import java.util.concurrent.locks.ReentrantLock; public class Item extends AbstractWorldObject { private static ConcurrentHashMap enchantValues = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); - private final short durabilityMax; - private final byte chargesMax; + private short durabilityMax; + private byte chargesMax; private final ConcurrentHashMap bonuses = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); private final ArrayList effectNames = new ArrayList<>(); public Enum.ItemContainerType containerType; @@ -62,10 +62,19 @@ public class Item extends AbstractWorldObject { private long dateToUpgrade; private String customName = ""; private int magicValue; + public ItemTemplate template; + public String name; /** - * No Id Constructor + * In Memory constructor */ + + public Item(int templateID) { + + this.template = ItemTemplate.itemTemplates.get(templateID); + + } + public Item(ItemBase itemBase, int ownerID, OwnerType ownerType, byte chargesMax, byte chargesRemaining, short durabilityCurrent, short durabilityMax, boolean canDestroy,