From 440e43935abce47e14999eb38a0f0f2b47241739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Thu, 19 Sep 2024 14:08:45 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/Steam/Exchange/Trading.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm/Steam/Exchange/Trading.cs b/ArchiSteamFarm/Steam/Exchange/Trading.cs index d48a8cc72ff08..900c8e6d7d2bd 100644 --- a/ArchiSteamFarm/Steam/Exchange/Trading.cs +++ b/ArchiSteamFarm/Steam/Exchange/Trading.cs @@ -550,6 +550,9 @@ private async Task ParseTrade(TradeOffer tradeOffer, ISet<(uin bool accept = IsTradeNeutralOrBetter(inventory, tradeOffer.ItemsToGive, tradeOffer.ItemsToReceive); + // We're now sure whether the trade is neutral+ for us or not + ParseTradeResult.EResult acceptResult; + if (accept) { // Ensure that accepting this trade offer does not create conflicts with other lock (handledSets) { @@ -561,10 +564,11 @@ private async Task ParseTrade(TradeOffer tradeOffer, ISet<(uin handledSets.UnionWith(wantedSets); } - } - // We're now sure whether the trade is neutral+ for us or not - ParseTradeResult.EResult acceptResult = accept ? ParseTradeResult.EResult.Accepted : ParseTradeResult.EResult.Rejected; + acceptResult = ParseTradeResult.EResult.Accepted; + } else { + acceptResult = ParseTradeResult.EResult.Rejected; + } Bot.ArchiLogger.LogGenericDebug(Strings.FormatBotTradeOfferResult(tradeOffer.TradeOfferID, acceptResult, nameof(IsTradeNeutralOrBetter)));