43 ShopItem(
int inventoryIndex,
int id,
int quantity,
int price);
Represents one or more instances of a certain item type.
int mInvIndex
Inventory index.
Represents an item in a shop inventory.
int getCurrentQuantity() const
Gets the quantity of the currently topmost duplicate.
int getCurrentInvIndex() const
Gets the inventory index of the currently topmost duplicate.
void addDuplicate(int inventoryIndex, int quantity)
Add a duplicate.
int sellCurrentDuplicate(int quantity)
Reduces the quantity of the topmost duplicate by the specified amount.
const std::string & getDisplayName() const
Gets the display name for the item in the shop list.
std::stack< DuplicateItem > mDuplicates
int getPrice() const
Gets the price of the item.
Struct to keep track of duplicates.