Core/Items: Fix money refund amount. Also fix a possible exploit possibility of redeeming both vendor sellprice and money refund price in one go.

This commit is contained in:
Machiavelli
2011-01-24 23:10:08 +01:00
parent ba204ae3a7
commit 0ad2c90d22
2 changed files with 11 additions and 3 deletions
@@ -529,6 +529,12 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
return;
}
// prevent selling item for sellprice when the item is still refundable
// this probably happens when right clicking a refundable item, the client sends both
// CMSG_SELL_ITEM and CMSG_REFUND_ITEM (unverified)
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE))
return; // Therefore, no feedback to client
// special case at auto sell (sell all)
if (count == 0)
{