From a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 29 Jun 2010 23:20:09 +0200 Subject: Fixed sell support on tmwAthena while keeping it working for Manaserv. --- src/gui/sell.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gui/sell.cpp') 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; } -- cgit v1.2.3-70-g09d2