|
|
|
@ -39,8 +39,8 @@ import java.util.concurrent.locks.ReentrantLock;
@@ -39,8 +39,8 @@ import java.util.concurrent.locks.ReentrantLock;
|
|
|
|
|
public class Item extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
private static ConcurrentHashMap<String, Integer> 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<AbstractEffectModifier, Float> bonuses = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW); |
|
|
|
|
private final ArrayList<String> effectNames = new ArrayList<>(); |
|
|
|
|
public Enum.ItemContainerType containerType; |
|
|
|
@ -62,10 +62,19 @@ public class Item extends AbstractWorldObject {
@@ -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, |
|
|
|
|