diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-13 20:40:16 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-13 20:40:16 +0000 |
commit | d3e938c478570be44c497607262fe8ca7145b171 (patch) | |
tree | 24f0e39e7f46d0ce17ba3f135137f8c7b024a2cf /src/gui/shop.cpp | |
parent | 0bc585c7299ed1c9bccfaf0aa6b2cc7c4327d1ca (diff) | |
download | mana-d3e938c478570be44c497607262fe8ca7145b171.tar.gz mana-d3e938c478570be44c497607262fe8ca7145b171.tar.bz2 mana-d3e938c478570be44c497607262fe8ca7145b171.tar.xz mana-d3e938c478570be44c497607262fe8ca7145b171.zip |
Started conversion of buy/sell to new server.
Diffstat (limited to 'src/gui/shop.cpp')
-rw-r--r-- | src/gui/shop.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index 3d972bc2..e2fd54f2 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -40,15 +40,17 @@ std::string ShopItems::getElementAt(int i) return mItemsShop.at(i).name; } -void ShopItems::addItem(short id, int price) +void ShopItems::addItem(int id, int amount, int price) { ITEM_SHOP item_shop; + ItemInfo const &item = ItemDB::get(id); - item_shop.name = ItemDB::get(id).getName() + item_shop.name = item.getName() + " (" + toString(price) + " GP)"; item_shop.price = price; item_shop.id = id; - item_shop.image = ItemDB::get(id).getImage(); + item_shop.quantity = amount; + item_shop.image = item.getImage(); mItemsShop.push_back(item_shop); } |