mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Allow unreasonable item price code to work with item sub types
This commit is contained in:
parent
4b9f2ddbd1
commit
d3f66a85a0
@ -285,7 +285,16 @@ export class RagfairPriceService implements OnLoad
|
|||||||
if (items.length === 1)
|
if (items.length === 1)
|
||||||
{
|
{
|
||||||
const rootItemDb = this.itemHelper.getItem(rootItem._tpl)[1];
|
const rootItemDb = this.itemHelper.getItem(rootItem._tpl)[1];
|
||||||
const unreasonableItemPriceChange = this.ragfairConfig.dynamic.unreasonableModPrices[rootItemDb._parent];
|
let unreasonableItemPriceChange: IUnreasonableModPrices;
|
||||||
|
for (const key of Object.keys(this.ragfairConfig.dynamic.unreasonableModPrices))
|
||||||
|
{
|
||||||
|
if (this.itemHelper.isOfBaseclass(rootItemDb._id, key))
|
||||||
|
{
|
||||||
|
unreasonableItemPriceChange = this.ragfairConfig.dynamic.unreasonableModPrices[key];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (unreasonableItemPriceChange?.enabled)
|
if (unreasonableItemPriceChange?.enabled)
|
||||||
{
|
{
|
||||||
price = this.adjustUnreasonablePrice(
|
price = this.adjustUnreasonablePrice(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user