mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Remove excessive private gettes from assets
Those getters are not required for item classification, and their removal decreases the request size, effectively increasing the amount of items we can send across one without running into POST size. At the same time 255 is still relevant in regards to Steam servers stability.
This commit is contained in:
@@ -97,6 +97,7 @@ namespace ArchiSteamFarm.Json {
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
|
||||
#pragma warning disable IDE0052
|
||||
[JsonProperty(PropertyName = "assetid", Required = Required.DisallowNull)]
|
||||
[JetBrains.Annotations.NotNull]
|
||||
private string AssetIDText {
|
||||
@@ -118,13 +119,12 @@ namespace ArchiSteamFarm.Json {
|
||||
AssetID = assetID;
|
||||
}
|
||||
}
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
#pragma warning disable IDE0051
|
||||
[JsonProperty(PropertyName = "classid", Required = Required.DisallowNull)]
|
||||
[JetBrains.Annotations.NotNull]
|
||||
private string ClassIDText {
|
||||
get => ClassID.ToString();
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(value));
|
||||
@@ -169,7 +169,6 @@ namespace ArchiSteamFarm.Json {
|
||||
[JsonProperty(PropertyName = "id", Required = Required.DisallowNull)]
|
||||
[JetBrains.Annotations.NotNull]
|
||||
private string IDText {
|
||||
get => AssetIDText;
|
||||
set => AssetIDText = value;
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
@@ -178,8 +177,6 @@ namespace ArchiSteamFarm.Json {
|
||||
[JsonProperty(PropertyName = "instanceid", Required = Required.DisallowNull)]
|
||||
[JetBrains.Annotations.NotNull]
|
||||
private string InstanceIDText {
|
||||
get => InstanceID.ToString();
|
||||
|
||||
set {
|
||||
if (string.IsNullOrEmpty(value)) {
|
||||
return;
|
||||
|
||||
@@ -34,7 +34,7 @@ using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm {
|
||||
public sealed class Trading : IDisposable {
|
||||
internal const byte MaxItemsPerTrade = 200; // This is decided upon various factors, mainly limit on POST size in WebBrowser, as well as stability of Steam servers when dealing with huge trade offers
|
||||
internal const byte MaxItemsPerTrade = byte.MaxValue; // This is decided upon various factors, mainly limit on POST size in WebBrowser, as well as stability of Steam servers when dealing with huge trade offers
|
||||
internal const byte MaxTradesPerAccount = 5; // This is limit introduced by Valve
|
||||
|
||||
private readonly Bot Bot;
|
||||
|
||||
Reference in New Issue
Block a user