Skip to content

Commit

Permalink
Fix last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Oct 6, 2024
1 parent 6b38586 commit db1c089
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Source/stores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

Expand Down Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit db1c089

Please sign in to comment.