diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-06-29 23:20:09 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-06-29 23:20:09 +0200 |
commit | a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d (patch) | |
tree | 10ab708737b28bbaacf4d2d93f9e618ee80461fb /src/gui/sell.cpp | |
parent | f49df74a3a4a1b43f0a7671338733ef05520dcb4 (diff) | |
download | mana-a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d.tar.gz mana-a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d.tar.bz2 mana-a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d.tar.xz mana-a2bb244ea72fefdb60d8ef5b037dfbc5b6ac842d.zip |
Fixed sell support on tmwAthena while keeping it working for Manaserv.
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r-- | src/gui/sell.cpp | 8 |
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; } |