diff options
| author | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-12 22:33:32 -0800 |
| commit | c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 (patch) | |
| tree | df9f48bf128a6c0186a8e91857d6ff30fe0e9f18 /NET/worlds/scape/InventoryItem.java | |
| download | worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.tar.xz worldsplayer-c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9.zip | |
Initial commit
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); + } +} |