mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Remove inventory count that no longer does anything anyway
This commit is contained in:
@@ -42,7 +42,7 @@ using ArchiSteamFarm.Web;
|
||||
namespace ArchiSteamFarm.Core;
|
||||
|
||||
internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
|
||||
private const ushort MaxItemsForFairBots = ArchiWebHandler.RecommendedItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
|
||||
private const ushort MaxItemsForFairBots = ArchiWebHandler.MaxItemsInSingleInventoryRequest * WebBrowser.MaxTries; // Determines which fair bots we'll deprioritize when matching due to excessive number of inventory requests they need to make, which are likely to fail in the process or cause excessive delays
|
||||
private const byte MaxMatchedBotsHard = 40; // Determines how many bots we can attempt to match in total, where match attempt is equal to analyzing bot's inventory
|
||||
private const byte MaxMatchingRounds = 10; // Determines maximum amount of matching rounds we're going to consider before leaving the rest of work for the next batch
|
||||
private const byte MinAnnouncementCheckTTL = 6; // Minimum amount of hours we must wait before checking eligibility for Announcement, should be lower than MinPersonaStateTTL
|
||||
|
||||
@@ -48,11 +48,10 @@ using SteamKit2;
|
||||
namespace ArchiSteamFarm.Steam.Integration;
|
||||
|
||||
public sealed class ArchiWebHandler : IDisposable {
|
||||
internal const ushort RecommendedItemsInSingleInventoryRequest = 2000; // In regards to rate limits
|
||||
internal const ushort MaxItemsInSingleInventoryRequest = 5000;
|
||||
|
||||
private const string EconService = "IEconService";
|
||||
private const string LoyaltyRewardsService = "ILoyaltyRewardsService";
|
||||
private const ushort MaxItemsInSingleInventoryRequest = 5000;
|
||||
private const byte MinimumSessionValidityInSeconds = 10;
|
||||
private const string SteamAppsService = "ISteamApps";
|
||||
private const string SteamUserAuthService = "ISteamUserAuth";
|
||||
@@ -136,8 +135,6 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
throw new InvalidOperationException(nameof(ASF.InventorySemaphore));
|
||||
}
|
||||
|
||||
ushort count = RecommendedItemsInSingleInventoryRequest;
|
||||
|
||||
if (steamID == 0) {
|
||||
if (!Initialized) {
|
||||
byte connectionTimeout = ASF.GlobalConfig?.ConnectionTimeout ?? GlobalConfig.DefaultConnectionTimeout;
|
||||
@@ -152,7 +149,6 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
}
|
||||
|
||||
steamID = Bot.SteamID;
|
||||
count = MaxItemsInSingleInventoryRequest;
|
||||
} else if (!new SteamID(steamID).IsIndividualAccount) {
|
||||
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(steamID)));
|
||||
}
|
||||
@@ -165,7 +161,7 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
int rateLimitingDelay = (ASF.GlobalConfig?.InventoryLimiterDelay ?? GlobalConfig.DefaultInventoryLimiterDelay) * 1000;
|
||||
|
||||
while (true) {
|
||||
Uri request = new(SteamCommunityURL, $"/inventory/{steamID}/{appID}/{contextID}?count={count}&l=english{(startAssetID > 0 ? $"&start_assetid={startAssetID}" : "")}");
|
||||
Uri request = new(SteamCommunityURL, $"/inventory/{steamID}/{appID}/{contextID}?l=english&count={MaxItemsInSingleInventoryRequest}{(startAssetID > 0 ? $"&start_assetid={startAssetID}" : "")}");
|
||||
|
||||
await ASF.InventorySemaphore.WaitAsync().ConfigureAwait(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user