255
255
mMaxItems -= mAmountItems;
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);
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();
267
272
Net::getNpcHandler()->sellItem(mNpcId, itemIndex, sellCount);
268
273
mAmountItems -= sellCount;