forked from MagicBane/Server
More item refactor work.
This commit is contained in:
@@ -65,6 +65,7 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
/**
|
||||
* In Memory constructor
|
||||
* Set values and call PERSIST();
|
||||
*/
|
||||
|
||||
public Item(int templateID) {
|
||||
@@ -79,36 +80,6 @@ public class Item extends AbstractWorldObject {
|
||||
bakeInStats();
|
||||
}
|
||||
|
||||
/**
|
||||
* Normal Constructor
|
||||
*/
|
||||
public Item(ItemBase itemBase, int ownerID,
|
||||
OwnerType ownerType, byte chargesMax, byte chargesRemaining,
|
||||
short durabilityCurrent, short durabilityMax, boolean canDestroy,
|
||||
boolean rentable, boolean inBank, boolean inVault,
|
||||
boolean inInventory, boolean isEquipped, byte equipSlot,
|
||||
ArrayList<EnchantmentBase> enchants, int newUUID) {
|
||||
|
||||
super(newUUID);
|
||||
this.templsteID = itemBase.getUUID();
|
||||
this.ownerID = ownerID;
|
||||
this.ownerType = ownerType;
|
||||
this.customName = "";
|
||||
|
||||
this.chargesMax = (byte) itemBase.getNumCharges();
|
||||
this.chargesRemaining = (byte) itemBase.getNumCharges();
|
||||
|
||||
this.durabilityMax = (short) itemBase.getDurability();
|
||||
this.durabilityCurrent = (short) itemBase.getDurability();
|
||||
this.canDestroy = canDestroy;
|
||||
this.equipSlot = equipSlot;
|
||||
this.flags = 1;
|
||||
this.value = this.magicValue;
|
||||
|
||||
loadEnchantments();
|
||||
bakeInStats();
|
||||
}
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user