diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-06 16:58:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-06 16:58:18 +0300 |
commit | d557ce63e240960746e48c678b4a08ba66f7fe40 (patch) | |
tree | 8dfa33e155d7ea2145df9056895f0c1293155349 /src/resources/item/shopitem.cpp | |
parent | 8e243bbcdae592e1c003e5d2c37c8f0e8f1304e7 (diff) | |
download | manaverse-d557ce63e240960746e48c678b4a08ba66f7fe40.tar.gz manaverse-d557ce63e240960746e48c678b4a08ba66f7fe40.tar.bz2 manaverse-d557ce63e240960746e48c678b4a08ba66f7fe40.tar.xz manaverse-d557ce63e240960746e48c678b4a08ba66f7fe40.zip |
Add custom currency also into shop items list.
Diffstat (limited to 'src/resources/item/shopitem.cpp')
-rw-r--r-- | src/resources/item/shopitem.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/resources/item/shopitem.cpp b/src/resources/item/shopitem.cpp index b3d088b36..27a496814 100644 --- a/src/resources/item/shopitem.cpp +++ b/src/resources/item/shopitem.cpp @@ -37,7 +37,8 @@ ShopItem::ShopItem(const int inventoryIndex, const ItemTypeT type, const ItemColor color, const int quantity, - const int price) : + const int price, + const std::string ¤cy) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, @@ -45,6 +46,7 @@ ShopItem::ShopItem(const int inventoryIndex, Equipm_false, Equipped_false), mDisplayName(), + mCurrency(currency), mDuplicates(), mPrice(price), mUsedQuantity(0), @@ -60,7 +62,8 @@ ShopItem::ShopItem(const int inventoryIndex, ShopItem::ShopItem(const int id, const ItemTypeT type, const ItemColor color, - const int price) : + const int price, + const std::string ¤cy) : Item(id, type, 0, 0, color, Identified_true, Damaged_false, @@ -68,6 +71,7 @@ ShopItem::ShopItem(const int id, Equipm_false, Equipped_false), mDisplayName(), + mCurrency(currency), mDuplicates(), mPrice(price), mUsedQuantity(0), @@ -99,7 +103,7 @@ void ShopItem::updateDisplayName(const int quantity) if (mPrice) { mDisplayName.append(" (").append( - UnitsDb::formatCurrency(mPrice)).append(") "); + UnitsDb::formatCurrency(mCurrency, mPrice)).append(") "); } if (mShowQuantity && quantity > 1) mDisplayName.append("[").append(toString(quantity)).append("]"); |