From 309fffeab2c40405a68e8b20d53ee6d1433817bb Mon Sep 17 00:00:00 2001 From: CWX Date: Wed, 30 Apr 2025 13:31:25 +0100 Subject: [PATCH] Remove redundant code from node --- Libraries/SPTarkov.Server.Core/Services/PaymentService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Services/PaymentService.cs b/Libraries/SPTarkov.Server.Core/Services/PaymentService.cs index ef0d315e..93cce508 100644 --- a/Libraries/SPTarkov.Server.Core/Services/PaymentService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/PaymentService.cs @@ -70,7 +70,7 @@ public class PaymentService( { // If the item is money, add its count to the currencyAmounts object. // sometimes the currency can be in two parts, so it fails to tryadd the second part - if (!currencyAmounts.TryAdd(item.Template, currencyAmounts.GetValueOrDefault(item.Template, 0) + itemRequest.Count)) + if (!currencyAmounts.TryAdd(item.Template, itemRequest.Count)) { // if it fails, add the amount to the existing amount currencyAmounts[item.Template] += itemRequest.Count; @@ -83,7 +83,7 @@ public class PaymentService( // Handle differently, `id` is the money type tpl var currencyTpl = itemRequest.Id; // sometimes the currency can be in two parts, so it fails to tryadd the second part - if (!currencyAmounts.TryAdd(currencyTpl, currencyAmounts.GetValueOrDefault(currencyTpl, 0) + itemRequest.Count)) + if (!currencyAmounts.TryAdd(currencyTpl, itemRequest.Count)) { // if it fails, add the amount to the existing amount currencyAmounts[currencyTpl] += itemRequest.Count;