summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-06-29 22:53:20 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-06-29 22:56:45 +0200
commitf49df74a3a4a1b43f0a7671338733ef05520dcb4 (patch)
tree73e1f34af5db1703589b75f3cb27268c5e269bdc /src/gui/sell.cpp
parent4a33f2bf841ec3c7b0a0555b3ea75c54a70be5e9 (diff)
downloadmana-client-f49df74a3a4a1b43f0a7671338733ef05520dcb4.tar.gz
mana-client-f49df74a3a4a1b43f0a7671338733ef05520dcb4.tar.bz2
mana-client-f49df74a3a4a1b43f0a7671338733ef05520dcb4.tar.xz
mana-client-f49df74a3a4a1b43f0a7671338733ef05520dcb4.zip
Fixed the sell support under Manaserv.
Made the sell dialog give the idem id, instead of an internal inventory id when a item is a duplicate. Reviewed-by: Freeyorp, Strikermdd Resolves: Manasource-Mantis #101
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index a4109033..dcbdd7bd 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -194,8 +194,9 @@ void SellDialog::action(const gcn::ActionEvent &event)
{
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
- itemIndex = item->getCurrentInvIndex();
+ item->getCurrentInvIndex();
sellCount = item->sellCurrentDuplicate(mAmountItems);
+ itemIndex = item->getId();
Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
mAmountItems -= sellCount;
}