Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Sep 19, 2024
1 parent 1dff9a4 commit 440e439
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ArchiSteamFarm/Steam/Exchange/Trading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ private async Task<ParseTradeResult> 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) {
Expand All @@ -561,10 +564,11 @@ private async Task<ParseTradeResult> 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)));

Expand Down

0 comments on commit 440e439

Please sign in to comment.