From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/scape/InventoryItem.java | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 NET/worlds/scape/InventoryItem.java (limited to 'NET/worlds/scape/InventoryItem.java') 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); + } +} -- cgit v1.2.3