From 770eafd5111f1af27da5de28017cb57fb8143757 Mon Sep 17 00:00:00 2001 From: Alexander Drozdov Date: Wed, 15 Jun 2022 13:17:30 +0300 Subject: [PATCH] fix stat of flag type, closes #561 --- .../src/web/price-check/trade/pathofexile-trade.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/renderer/src/web/price-check/trade/pathofexile-trade.ts b/renderer/src/web/price-check/trade/pathofexile-trade.ts index 9eed32ee..87199f01 100644 --- a/renderer/src/web/price-check/trade/pathofexile-trade.ts +++ b/renderer/src/web/price-check/trade/pathofexile-trade.ts @@ -599,10 +599,22 @@ function getMinMax (roll: StatFilter['roll']) { } function tradeIdToQuery (id: string, stat: StatFilter) { + // NOTE: if there will be too many overrides in the future, + // consider moving them to stats.ndjson + + let roll = stat.roll + + // fixes Corrupted Implicit "Bleeding cannot be inflicted on you" + if (id.endsWith('stat_1901158930')) { + if (stat.roll?.value === 100) { + roll = undefined // stat semantic type is flag + } + } + return { id, value: { - ...getMinMax(stat.roll), + ...getMinMax(roll), option: stat.option != null ? stat.option.value : undefined