mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Do not send more than 5 trade offers at once, #81
This commit is contained in:
@@ -426,7 +426,7 @@ namespace ArchiSteamFarm {
|
||||
List<SteamTradeOfferRequest> trades = new List<SteamTradeOfferRequest>();
|
||||
|
||||
SteamTradeOfferRequest singleTrade = null;
|
||||
for (ushort i = 0; i < inventory.Count; i++) {
|
||||
for (ushort i = 0; i < inventory.Count && i < Trading.MaxTradesPerAccount; i++) {
|
||||
if (i % Trading.MaxItemsPerTrade == 0) {
|
||||
singleTrade = new SteamTradeOfferRequest();
|
||||
trades.Add(singleTrade);
|
||||
|
||||
@@ -28,7 +28,8 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
internal sealed class Trading {
|
||||
internal const ushort MaxItemsPerTrade = 150;
|
||||
internal const byte MaxItemsPerTrade = 150; // This is due to limit on POST size in WebBrowser
|
||||
internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve
|
||||
|
||||
private readonly Bot Bot;
|
||||
private readonly SemaphoreSlim Semaphore = new SemaphoreSlim(1);
|
||||
|
||||
Reference in New Issue
Block a user