Skip to content

Commit

Permalink
Fixed weird costs
Browse files Browse the repository at this point in the history
  • Loading branch information
Haxxer committed Sep 8, 2022
1 parent 314f2f1 commit 80ea038
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers/pile-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ export function getItemPrices(item, {
return priceData;
}

// !(itemFlagData.disableNormalCost || (merchant === buyer && sellerFlagData.onlyAcceptBasePrice)) &&

// If the item does include its normal cost, we calculate that here
if (!itemFlagData.disableNormalCost && overallCost >= smallestExchangeRate) {
if (overallCost >= smallestExchangeRate && (!itemFlagData.disableNormalCost || (merchant === buyer && buyerFlagData.onlyAcceptBasePrice))) {

// Base prices is the displayed price, without quantity taken into account
const baseCost = Helpers.roundToDecimals(overallCost * modifier, decimals);
Expand Down Expand Up @@ -536,7 +538,7 @@ export function getItemPrices(item, {
}

// If the item has custom prices, we include them here
if (itemFlagData.prices.length && !sellerFlagData.onlyAcceptBasePrice) {
if (itemFlagData.prices.length && !(merchant === buyer && buyerFlagData.onlyAcceptBasePrice)) {

priceData = priceData.concat(itemFlagData.prices.map(priceGroup => {
const prices = priceGroup.map(price => {
Expand Down

0 comments on commit 80ea038

Please sign in to comment.