From db1c089742d260dd4501924f1d1a19018891be77 Mon Sep 17 00:00:00 2001 From: Eric Robinson Date: Sun, 6 Oct 2024 17:10:09 -0400 Subject: [PATCH] Fix last commit --- Source/stores.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/stores.cpp b/Source/stores.cpp index 0d753a69f5b..bf1a472d88a 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -686,14 +686,14 @@ void BuildPlayerItemsVector() for (int8_t i = 0; i < MyPlayer->_pNumInv; i++) { if (MyPlayer->InvList[i].isEmpty()) continue; - playerItems.push_back({ &MyPlayer->InvList[i], ItemLocation::Inventory, i, MyPlayer->InvList[i]._iIvalue }); + playerItems.push_back({ &MyPlayer->InvList[i], ItemLocation::Inventory, i }); } // Add belt items for (int i = 0; i < MaxBeltItems; i++) { if (MyPlayer->SpdList[i].isEmpty()) continue; - playerItems.push_back({ &MyPlayer->SpdList[i], ItemLocation::Belt, i, MyPlayer->SpdList[i]._iIvalue }); + playerItems.push_back({ &MyPlayer->SpdList[i], ItemLocation::Belt, i }); } } @@ -1230,13 +1230,9 @@ bool StoreGoldFit(Item &item) int GetSellPrice(const Item &item) { - int price = item._iIvalue; - - if (item._iMagical != ITEM_QUALITY_NORMAL && item._iIdentified) { - price = price / 2; - } + int price = item._iIdentified ? item._iIvalue : item._ivalue; - return price; + return price / 4; } /**