summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-11 15:47:35 +0000
commit8da32105732949b4b0273c718d118bcfae70a1c9 (patch)
tree0a354974d48268cfaafcdb1e06b498fa26a59c1e /src/gui/sell.cpp
parentf9ce4e302cb3ed203d89a7a18e10b7ad4f11519c (diff)
downloadmana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.gz
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.bz2
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.tar.xz
mana-client-8da32105732949b4b0273c718d118bcfae70a1c9.zip
Merged 0.0 changes from revision 2825 to 2898 to trunk.
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index fd63633c..499bbd05 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -37,7 +37,7 @@
#include "../npc.h"
#include "../resources/iteminfo.h"
-#include "../resources/itemmanager.h"
+#include "../resources/itemdb.h"
#include "../utils/tostring.h"
@@ -232,6 +232,7 @@ void SellDialog::action(const std::string &eventId, gcn::Widget *widget)
mMaxItems -= mAmountItems;
mShopItems->getShop()->at(selectedItem).quantity = mMaxItems;
+ mPlayerMoney += (mAmountItems * mShopItems->at(selectedItem).price);
mAmountItems = 0;
mSlider->setValue(0);
mSlider->setEnabled(mMaxItems != 0);
@@ -274,7 +275,7 @@ void SellDialog::selectionChanged(const SelectionEvent &event)
if (selectedItem > -1)
{
const ItemInfo &info =
- itemDb->getItemInfo(mShopItems->at(selectedItem).id);
+ ItemDB::get(mShopItems->at(selectedItem).id);
mItemDescLabel->setCaption("Description: " + info.getDescription());
mItemEffectLabel->setCaption("Effect: " + info.getEffect());