diff options
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -26,6 +26,8 @@ #include "resources/itemdb.h" +class Image; + /** * Represents one or more instances of a certain item type. */ @@ -38,6 +40,11 @@ class Item Item(int id = 0, int quantity = 0); /** + * Destructor. + */ + ~Item(); + + /** * Sets the item id, identifying the item type. */ void setId(int id); @@ -49,6 +56,11 @@ class Item getId() const { return mId; } /** + * Returns the item image. + */ + Image* getImage() { return mImage; } + + /** * Sets the number of items. */ void @@ -92,6 +104,7 @@ class Item protected: int mId; /**< Item type id. */ + Image *mImage; /**< Item image. */ int mQuantity; /**< Number of items. */ bool mEquipment; /**< Item is equipment. */ int mInvIndex; /**< Inventory index. */ |