From f49df74a3a4a1b43f0a7671338733ef05520dcb4 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 29 Jun 2010 22:53:20 +0200 Subject: 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 --- src/gui/sell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2