mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 22:20:52 +00:00
Preserve correct items to receive/give for trade offer plugins
This commit is contained in:
@@ -615,7 +615,7 @@ namespace ArchiSteamFarm {
|
||||
return ParseTradeResult.EResult.TryAgain;
|
||||
}
|
||||
|
||||
bool accept = IsTradeNeutralOrBetter(inventory, tradeOffer.ItemsToGive, tradeOffer.ItemsToReceive);
|
||||
bool accept = IsTradeNeutralOrBetter(inventory, tradeOffer.ItemsToGive.Select(item => item.CreateShallowCopy()).ToHashSet(), tradeOffer.ItemsToReceive.Select(item => item.CreateShallowCopy()).ToHashSet());
|
||||
|
||||
// We're now sure whether the trade is neutral+ for us or not
|
||||
return accept ? ParseTradeResult.EResult.Accepted : ParseTradeResult.EResult.Rejected;
|
||||
|
||||
Reference in New Issue
Block a user