mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Improve flea handling of quality filtering for offers with child objects like armors/plates/weapons
This commit is contained in:
parent
7a33eea672
commit
a06e0d1641
@ -611,12 +611,29 @@ export class RagfairOfferHelper
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (offer.items.length === 1)
|
||||||
this.isConditionItem(offerRootItem)
|
|
||||||
&& !this.itemQualityInRange(offerRootItem, searchRequest.conditionFrom, searchRequest.conditionTo)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return false;
|
// Single item
|
||||||
|
if (
|
||||||
|
this.isConditionItem(offerRootItem)
|
||||||
|
&& !this.itemQualityInRange(offerRootItem, searchRequest.conditionFrom, searchRequest.conditionTo)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const itemQualityPercent = this.itemHelper.getItemQualityModifierForOfferItems(offer.items) * 100;
|
||||||
|
if (itemQualityPercent < searchRequest.conditionFrom)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemQualityPercent > searchRequest.conditionTo)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (searchRequest.currency > 0 && this.paymentHelper.isMoneyTpl(moneyTypeTpl))
|
if (searchRequest.currency > 0 && this.paymentHelper.isMoneyTpl(moneyTypeTpl))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user