From 8f4df131ac23edfe81ca59423996505c0aa0d7cf Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 5 Mar 2024 08:52:21 +0000 Subject: [PATCH] Make use of `itemHelper.isOfBaseclasses()` inside duplicate fence offer check Can now handle items that have a blacklisted grandparent --- project/src/services/FenceService.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/project/src/services/FenceService.ts b/project/src/services/FenceService.ts index 934709ca..e8f67e3d 100644 --- a/project/src/services/FenceService.ts +++ b/project/src/services/FenceService.ts @@ -608,16 +608,14 @@ export class FenceService this.itemHelper.remapRootItemId(desiredAssortItemAndChildrenClone); const rootItemBeingAdded = desiredAssortItemAndChildrenClone[0]; - 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 if ( assorts.items.some((item) => item._tpl === rootItemBeingAdded._tpl) - && this.traderConfig.fence.preventDuplicateOffersOfCategory.includes( - this.itemHelper.getItem(rootItemBeingAdded._tpl)[1]._parent, + && this.itemHelper.isOfBaseclasses( + rootItemBeingAdded._tpl, + this.traderConfig.fence.preventDuplicateOffersOfCategory, ) ) {