summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-13 20:40:16 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-13 20:40:16 +0000
commitd3e938c478570be44c497607262fe8ca7145b171 (patch)
tree24f0e39e7f46d0ce17ba3f135137f8c7b024a2cf /src/gui/sell.cpp
parent0bc585c7299ed1c9bccfaf0aa6b2cc7c4327d1ca (diff)
downloadmana-client-d3e938c478570be44c497607262fe8ca7145b171.tar.gz
mana-client-d3e938c478570be44c497607262fe8ca7145b171.tar.bz2
mana-client-d3e938c478570be44c497607262fe8ca7145b171.tar.xz
mana-client-d3e938c478570be44c497607262fe8ca7145b171.zip
Started conversion of buy/sell to new server.
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 478371b1..53746248 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -126,22 +126,9 @@ void SellDialog::reset()
updateButtonsAndLabels();
}
-void SellDialog::addItem(Item *item, int price)
+void SellDialog::addItem(int item, int amount, int price)
{
- if (!item)
- return;
-
- ITEM_SHOP item_shop;
-
- item_shop.name = item->getInfo().getName()
- + " (" + toString(price) + " GP)";
- item_shop.price = price;
- item_shop.index = item->getInvIndex();
- item_shop.id = item->getId();
- item_shop.quantity = item->getQuantity();
- item_shop.image = item->getInfo().getImage();
-
- mShopItems->push_back(item_shop);
+ mShopItems->addItem(item, amount, price);
mShopItemList->adjustSize();
}