mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Extend logic for trades
This commit is contained in:
@@ -254,7 +254,7 @@ namespace ArchiSteamFarm {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're not farming, and we got new items, it's likely to be either booster pack or trade
|
// If we're not farming, and we got new items, it's likely to be a booster pack or likewise
|
||||||
// In this case, perform a loot if user wants to do so
|
// In this case, perform a loot if user wants to do so
|
||||||
await Bot.LootIfNeeded().ConfigureAwait(false);
|
await Bot.LootIfNeeded().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,11 @@ namespace ArchiSteamFarm {
|
|||||||
await Task.Delay(1000).ConfigureAwait(false); // Sometimes we can be too fast for Steam servers to generate confirmations, wait a short moment
|
await Task.Delay(1000).ConfigureAwait(false); // Sometimes we can be too fast for Steam servers to generate confirmations, wait a short moment
|
||||||
await Bot.AcceptConfirmations(true, Steam.ConfirmationDetails.EType.Trade, 0, acceptedTradeIDs).ConfigureAwait(false);
|
await Bot.AcceptConfirmations(true, Steam.ConfirmationDetails.EType.Trade, 0, acceptedTradeIDs).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (results.Any(result => (result != null) && ((result.Result == ParseTradeResult.EResult.AcceptedWithItemLose) || (result.Result == ParseTradeResult.EResult.AcceptedWithoutItemLose)))) {
|
||||||
|
// If we finished a trade, perform a loot if user wants to do so
|
||||||
|
await Bot.LootIfNeeded().ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<ParseTradeResult> ParseTrade(Steam.TradeOffer tradeOffer) {
|
private async Task<ParseTradeResult> ParseTrade(Steam.TradeOffer tradeOffer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user