~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/gui/selldialog.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
            mMaxItems -= mAmountItems;
256
256
            while (mAmountItems > 0)
257
257
            {
 
258
#ifdef MANASERV_SUPPORT
258
259
                // This order is important, item->getCurrentInvIndex() would
259
260
                // return the inventory index of the next Duplicate otherwise.
260
261
                int itemIndex = item->getCurrentInvIndex();
261
262
                const int sellCount = item->sellCurrentDuplicate(mAmountItems);
262
 
#ifdef MANASERV_SUPPORT
263
263
                // For Manaserv, the Item id is to be given as index.
264
264
                if ((Net::getNetworkType() == ServerInfo::MANASERV))
265
265
                    itemIndex = item->getId();
 
266
#else
 
267
                // This order is important, item->getCurrentInvIndex() would
 
268
                // return the inventory index of the next Duplicate otherwise.
 
269
                const int itemIndex = item->getCurrentInvIndex();
 
270
                const int sellCount = item->sellCurrentDuplicate(mAmountItems);
266
271
#endif
267
272
                Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
268
273
                mAmountItems -= sellCount;