From 6308546f2b056b0814700ffac111cacbc698aab8 Mon Sep 17 00:00:00 2001 From: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Date: Sun, 3 May 2026 22:54:49 -0700 Subject: [PATCH] Fix condition on second AdjustWeighting --- .../Services/BotEquipmentFilterService.cs | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs index bf1ad0ad0..10c26ccb2 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs @@ -360,20 +360,17 @@ protected void AdjustWeighting( { if (locationToUpdate.TryGetValue(itemToEditKvP.Key, out var existingValue)) { - if (existingValue == 0) - { - locationToUpdate[itemToEditKvP.Key] = itemToEditKvP.Value; - } - else + locationToUpdate[itemToEditKvP.Key] = itemToEditKvP.Value; + } + else + { + // Note: Logging disabled for now, because our configs are all kinds of wrong + if (showEditWarnings) { - // Note: Logging disabled for now, because our configs are all kinds of wrong - //if (showEditWarnings) - //{ - // if (logger.IsLogEnabled(LogLevel.Debug)) - // { - // logger.Debug($"Tried to edit a non-existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}"); - // } - //} + if (logger.IsLogEnabled(LogLevel.Debug)) + { + logger.Debug($"Tried to edit a non-existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}"); + } } } } @@ -425,13 +422,13 @@ protected void AdjustWeighting( else { // Note: Logging disabled for now, because our configs are all kinds of wrong - //if (showEditWarnings) - //{ - // if (logger.IsLogEnabled(LogLevel.Debug)) - // { - // logger.Debug($"Tried to edit a non - existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}"); - // } - //} + if (showEditWarnings) + { + if (logger.IsLogEnabled(LogLevel.Debug)) + { + logger.Debug($"Tried to edit a non - existent item for slot: {poolAdjustmentKvP} {itemToEditKvP}"); + } + } } } }