summaryrefslogtreecommitdiff
path: root/src/shopitem.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-03 21:54:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-04 02:14:03 +0300
commit2288a403ad4377fbb552243e805aaf0b5a4f5a0d (patch)
treead081047290fb6cc101f43833de6f565a368cf29 /src/shopitem.h
parentcd636f7e367cfb7fa2c348d00071301a480d62c3 (diff)
downloadmanaplus-2288a403ad4377fbb552243e805aaf0b5a4f5a0d.tar.gz
manaplus-2288a403ad4377fbb552243e805aaf0b5a4f5a0d.tar.bz2
manaplus-2288a403ad4377fbb552243e805aaf0b5a4f5a0d.tar.xz
manaplus-2288a403ad4377fbb552243e805aaf0b5a4f5a0d.zip
Allow buy from npc shop or from market more than one of item at one transaction.
Diffstat (limited to 'src/shopitem.h')
-rw-r--r--src/shopitem.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shopitem.h b/src/shopitem.h
index a1c3d5649..bfe7fe39a 100644
--- a/src/shopitem.h
+++ b/src/shopitem.h
@@ -143,6 +143,11 @@ class ShopItem final : public Item
bool isVisible() const
{ return mVisible; }
+ void increaseUsedQuantity(const int amount);
+
+ int getUsedQuantity() const A_WARN_UNUSED
+ { return mUsedQuantity; }
+
protected:
void updateDisplayName(const int quantity);
@@ -158,6 +163,7 @@ class ShopItem final : public Item
} DuplicateItem;
std::stack<DuplicateItem*> mDuplicates; /** <-- Stores duplicates */
int mPrice;
+ int mUsedQuantity;
bool mShowQuantity;
bool mVisible;
};