24#include <guichan/listmodel.hpp>
56 void addItem(
int id,
int amount,
int price);
67 void addItem(
int inventoryIndex,
int id,
int amount,
int price);
Represents an item in a shop inventory.
This class handles the list of items available in a shop.
std::string getElementAt(int i) override
Returns the name of item number i in the shop.
bool mMergeDuplicates
Look for duplicate entries on addition.
void addItem(int id, int amount, int price)
Adds an item to the list.
ShopItem * at(int i) const
Returns the item number i in the shop.
int getNumberOfElements() override
Returns the number of items in the shop.
void erase(int i)
Removes an element from the shop.
std::vector< ShopItem * > mShopItems
The list of items in the shop.
ShopItem * findItem(int id)
Searches the current items in the shop for the specified id and returns the item if found,...
void clear()
Clears the list of items in the shop.