summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/sell.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index dcbdd7bd..b017983c 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -194,9 +194,13 @@ void SellDialog::action(const gcn::ActionEvent &event)
{
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
- item->getCurrentInvIndex();
+ itemIndex = item->getCurrentInvIndex();
sellCount = item->sellCurrentDuplicate(mAmountItems);
- itemIndex = item->getId();
+
+ // 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);
mAmountItems -= sellCount;
}