From d3e938c478570be44c497607262fe8ca7145b171 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 13 Aug 2007 20:40:16 +0000 Subject: Started conversion of buy/sell to new server. --- src/gui/shop.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/shop.cpp') 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); } -- cgit v1.2.3-70-g09d2