diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-18 19:46:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-18 21:52:08 +0300 |
commit | c0d5142d1ed98b62ad87603fa9d2620dce256bd7 (patch) | |
tree | 6acc4c089999353ef39c83c3bef34bbf89dbfdd3 /src/gui/selldialog.cpp | |
parent | e85c6227064c905945a4d49a5e11a0078243a1ac (diff) | |
download | mv-c0d5142d1ed98b62ad87603fa9d2620dce256bd7.tar.gz mv-c0d5142d1ed98b62ad87603fa9d2620dce256bd7.tar.bz2 mv-c0d5142d1ed98b62ad87603fa9d2620dce256bd7.tar.xz mv-c0d5142d1ed98b62ad87603fa9d2620dce256bd7.zip |
add consts in gui classes.
Diffstat (limited to 'src/gui/selldialog.cpp')
-rw-r--r-- | src/gui/selldialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp index 63a29d0b1..4d30a742f 100644 --- a/src/gui/selldialog.cpp +++ b/src/gui/selldialog.cpp @@ -255,14 +255,19 @@ void SellDialog::action(const gcn::ActionEvent &event) mMaxItems -= mAmountItems; while (mAmountItems > 0) { +#ifdef MANASERV_SUPPORT // 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 // For Manaserv, the Item id is to be given as index. if ((Net::getNetworkType() == ServerInfo::MANASERV)) itemIndex = item->getId(); +#else + // This order is important, item->getCurrentInvIndex() would + // return the inventory index of the next Duplicate otherwise. + const int itemIndex = item->getCurrentInvIndex(); + const int sellCount = item->sellCurrentDuplicate(mAmountItems); #endif Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount); mAmountItems -= sellCount; |