From 1ffa0678e99a87441b7e8a6414d8960c5a2c5c7a Mon Sep 17 00:00:00 2001 From: Chomp Date: Fri, 24 Jan 2025 14:05:33 +0000 Subject: [PATCH] Fixed `randomiseArmorInsertsDurabilities` not removing plate slots that have been chosen to be removed from fence armors --- project/src/services/FenceService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/project/src/services/FenceService.ts b/project/src/services/FenceService.ts index 5e698a8a..b47b9fbc 100644 --- a/project/src/services/FenceService.ts +++ b/project/src/services/FenceService.ts @@ -1116,8 +1116,7 @@ export class FenceService { continue; } - let armorWithMods = armorItemAndMods; - + const armorWithMods = armorItemAndMods; const modItemDbDetails = this.itemHelper.getItem(plateTpl)[1]; // Chance to remove plate @@ -1125,7 +1124,7 @@ export class FenceService { this.traderConfig.fence.chancePlateExistsInArmorPercent[modItemDbDetails._props?.armorClass ?? "3"]; if (!this.randomUtil.getChance100(plateExistsChance)) { // Remove plate from armor - armorWithMods = armorItemAndMods.filter( + armorItemAndMods = armorItemAndMods.filter( (item) => item.slotId.toLowerCase() !== plateSlot._name.toLowerCase(), );