diff options
Diffstat (limited to 'NET/worlds/scape/InventoryItem.java')
| -rw-r--r-- | NET/worlds/scape/InventoryItem.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/NET/worlds/scape/InventoryItem.java b/NET/worlds/scape/InventoryItem.java new file mode 100644 index 0000000..22fbd30 --- /dev/null +++ b/NET/worlds/scape/InventoryItem.java @@ -0,0 +1,65 @@ +package NET.worlds.scape; + +import NET.worlds.network.URL; + +public class InventoryItem { + protected String itemId_; + protected String itemName_; + protected int itemQuantity_; + protected URL itemGraphicLocation_; + + public InventoryItem(String id, String name) { + this.itemId_ = id; + this.itemName_ = name; + this.itemQuantity_ = 1; + } + + public InventoryItem(String id, String name, int qty) { + this.itemId_ = id; + this.itemName_ = name; + this.itemQuantity_ = qty; + } + + public InventoryItem(InventoryItem in) { + this.itemId_ = in.itemId_; + this.itemName_ = in.itemName_; + this.itemQuantity_ = in.itemQuantity_; + this.itemGraphicLocation_ = in.itemGraphicLocation_; + } + + public String getItemId() { + return this.itemId_; + } + + public void setItemId(String id) { + this.itemId_ = id; + } + + public String getItemName() { + return this.itemName_; + } + + public void setItemName(String name) { + this.itemName_ = name; + } + + public int getItemQuantity() { + return this.itemQuantity_; + } + + public void setQuantity(int qty) { + this.itemQuantity_ = qty; + } + + public URL getItemGraphicLocation() { + return this.itemGraphicLocation_; + } + + public void setItemGraphicLocation(URL newLoc) { + this.itemGraphicLocation_ = newLoc; + } + + public InventoryItem cloneItem() { + return new InventoryItem(this); + } +} |