mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-26 06:50:06 +00:00
Fix incorrectly set item cost
This commit is contained in:
parent
1eb806af58
commit
941e986ee1
@ -193,7 +193,7 @@ void NPCManager::npcVendorBuy(CNSocket* sock, CNPacketData* data) {
|
|||||||
return;
|
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);
|
int slot = ItemManager::findFreeSlot(plr);
|
||||||
if (itemCost > plr->money || slot == -1) {
|
if (itemCost > plr->money || slot == -1) {
|
||||||
// NOTE: VENDOR_ITEM_BUY_FAIL is not actually handled client-side.
|
// NOTE: VENDOR_ITEM_BUY_FAIL is not actually handled client-side.
|
||||||
|
Loading…
Reference in New Issue
Block a user