summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-08 19:36:46 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-08 19:36:46 +0300
commitd63e4325051520c42349216c32c3390c61df2543 (patch)
tree0af5f03ddf66392c31792a46dea00d9fccf37410 /src
parentcda421c4c58e32f88d87641e0195a55a8f212757 (diff)
downloadplus-d63e4325051520c42349216c32c3390c61df2543.tar.gz
plus-d63e4325051520c42349216c32c3390c61df2543.tar.bz2
plus-d63e4325051520c42349216c32c3390c61df2543.tar.xz
plus-d63e4325051520c42349216c32c3390c61df2543.zip
fix unstackable items multi sell.
Diffstat (limited to 'src')
-rw-r--r--src/gui/selldialog.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index e9ec38423..1d076b72a 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -233,17 +233,14 @@ void SellDialog::action(const gcn::ActionEvent &event)
{
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
+ int itemIndex = item->getCurrentInvIndex();
const int sellCount = item->sellCurrentDuplicate(mAmountItems);
#ifdef MANASERV_SUPPORT
- int itemIndex = item->getCurrentInvIndex();
// For Manaserv, the Item id is to be given as index.
if ((Net::getNetworkType() == ServerInfo::MANASERV))
itemIndex = item->getId();
- Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
-#else
- Net::getNpcHandler()->sellItem(mNpcId,
- item->getCurrentInvIndex(), sellCount);
#endif
+ Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
mAmountItems -= sellCount;
}