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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
price = this.adjustUnreasonablePrice(
|
||||
|
Loading…
Reference in New Issue
Block a user