diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Data/ListedUser.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Data/ListedUser.cs index 2118b8216..c6f71c56f 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Data/ListedUser.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Data/ListedUser.cs @@ -4,7 +4,7 @@ // / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | | // /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_| // | -// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki +// Copyright 2015-2023 Łukasz "JustArchi" Domeradzki // Contact: JustArchi@JustArchi.net // | // Licensed under the Apache License, Version 2.0 (the "License"); @@ -55,6 +55,11 @@ internal sealed class ListedUser { internal readonly ulong SteamID; #pragma warning restore CS0649 // False positive, the field is used during json deserialization +#pragma warning disable CS0649 // False positive, the field is used during json deserialization + [JsonProperty(Required = Required.Always)] + internal readonly uint TotalInventoryCount; +#pragma warning restore CS0649 // False positive, the field is used during json deserialization + [JsonProperty(Required = Required.Always)] internal readonly string TradeToken = ""; diff --git a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs index 6cdfc9107..4cd63c488 100644 --- a/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs +++ b/ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs @@ -659,7 +659,7 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable { uint matchedSets = 0; - foreach (ListedUser listedUser in listedUsers.Where(listedUser => (listedUser.SteamID != Bot.SteamID) && acceptedMatchableTypes.Any(listedUser.MatchableTypes.Contains) && !Bot.IsBlacklistedFromTrades(listedUser.SteamID)).OrderByDescending(static listedUser => listedUser.MatchEverything).ThenBy(static listedUser => listedUser.Assets.Count)) { + foreach (ListedUser listedUser in listedUsers.Where(listedUser => (listedUser.SteamID != Bot.SteamID) && acceptedMatchableTypes.Any(listedUser.MatchableTypes.Contains) && !Bot.IsBlacklistedFromTrades(listedUser.SteamID)).OrderByDescending(static listedUser => listedUser.MatchEverything).ThenBy(static listedUser => listedUser.TotalInventoryCount)) { HashSet<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity)> wantedSets = ourTradableState.Keys.Where(set => listedUser.MatchableTypes.Contains(set.Type)).ToHashSet(); if (wantedSets.Count == 0) {