Fix incorrectly set item cost

This commit is contained in:
Gent 2020-09-30 13:30:19 -04:00
parent 1eb806af58
commit 941e986ee1

View File

@ -193,7 +193,7 @@ void NPCManager::npcVendorBuy(CNSocket* sock, CNPacketData* data) {
return;
}
int itemCost = item->sellPrice * (item->stackSize > 1 ? req->Item.iOpt : 1);
int itemCost = item->buyPrice * (item->stackSize > 1 ? req->Item.iOpt : 1);
int slot = ItemManager::findFreeSlot(plr);
if (itemCost > plr->money || slot == -1) {
// NOTE: VENDOR_ITEM_BUY_FAIL is not actually handled client-side.