mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Misc
This commit is contained in:
parent
1dff9a48a8
commit
440e43935a
1 changed files with 7 additions and 3 deletions
|
@ -550,6 +550,9 @@ public sealed class Trading : IDisposable {
|
||||||
|
|
||||||
bool accept = IsTradeNeutralOrBetter(inventory, tradeOffer.ItemsToGive, tradeOffer.ItemsToReceive);
|
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) {
|
if (accept) {
|
||||||
// Ensure that accepting this trade offer does not create conflicts with other
|
// Ensure that accepting this trade offer does not create conflicts with other
|
||||||
lock (handledSets) {
|
lock (handledSets) {
|
||||||
|
@ -561,10 +564,11 @@ public sealed class Trading : IDisposable {
|
||||||
|
|
||||||
handledSets.UnionWith(wantedSets);
|
handledSets.UnionWith(wantedSets);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// We're now sure whether the trade is neutral+ for us or not
|
acceptResult = ParseTradeResult.EResult.Accepted;
|
||||||
ParseTradeResult.EResult acceptResult = accept ? ParseTradeResult.EResult.Accepted : ParseTradeResult.EResult.Rejected;
|
} else {
|
||||||
|
acceptResult = ParseTradeResult.EResult.Rejected;
|
||||||
|
}
|
||||||
|
|
||||||
Bot.ArchiLogger.LogGenericDebug(Strings.FormatBotTradeOfferResult(tradeOffer.TradeOfferID, acceptResult, nameof(IsTradeNeutralOrBetter)));
|
Bot.ArchiLogger.LogGenericDebug(Strings.FormatBotTradeOfferResult(tradeOffer.TradeOfferID, acceptResult, nameof(IsTradeNeutralOrBetter)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue