Make use of itemHelper.isOfBaseclasses()
inside duplicate fence offer check
Can now handle items that have a blacklisted grandparent
This commit is contained in:
parent
0740a84f6f
commit
8f4df131ac
@ -608,16 +608,14 @@ export class FenceService
|
|||||||
this.itemHelper.remapRootItemId(desiredAssortItemAndChildrenClone);
|
this.itemHelper.remapRootItemId(desiredAssortItemAndChildrenClone);
|
||||||
|
|
||||||
const rootItemBeingAdded = desiredAssortItemAndChildrenClone[0];
|
const rootItemBeingAdded = desiredAssortItemAndChildrenClone[0];
|
||||||
|
|
||||||
rootItemBeingAdded.upd.StackObjectsCount = this.getSingleItemStackCount(itemDbDetails);
|
rootItemBeingAdded.upd.StackObjectsCount = this.getSingleItemStackCount(itemDbDetails);
|
||||||
// rootItemBeingAdded.upd.BuyRestrictionCurrent = 0;
|
|
||||||
// rootItemBeingAdded.upd.UnlimitedCount = false;
|
|
||||||
|
|
||||||
// Skip items already in the assort if it exists in the prevent duplicate list
|
// Skip items already in the assort if it exists in the prevent duplicate list
|
||||||
if (
|
if (
|
||||||
assorts.items.some((item) => item._tpl === rootItemBeingAdded._tpl)
|
assorts.items.some((item) => item._tpl === rootItemBeingAdded._tpl)
|
||||||
&& this.traderConfig.fence.preventDuplicateOffersOfCategory.includes(
|
&& this.itemHelper.isOfBaseclasses(
|
||||||
this.itemHelper.getItem(rootItemBeingAdded._tpl)[1]._parent,
|
rootItemBeingAdded._tpl,
|
||||||
|
this.traderConfig.fence.preventDuplicateOffersOfCategory,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user