mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 09:00:13 +00:00
Remove deprecated features
This commit is contained in:
@@ -326,24 +326,6 @@ namespace ArchiSteamFarm {
|
||||
return (true, Strings.BotLootingSuccess);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[PublicAPI]
|
||||
public async Task<(bool Success, string Message)> SendTradeOffer(uint appID = Steam.Asset.SteamAppID, ulong contextID = Steam.Asset.SteamCommunityContextID, ulong targetSteamID = 0, string tradeToken = null, IReadOnlyCollection<uint> wantedRealAppIDs = null, IReadOnlyCollection<uint> unwantedRealAppIDs = null, IReadOnlyCollection<Steam.Asset.EType> wantedTypes = null) {
|
||||
if ((appID == 0) || (contextID == 0)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(appID) + " || " + nameof(contextID));
|
||||
|
||||
return (false, string.Format(Strings.ErrorObjectIsNull, nameof(appID) + " || " + nameof(contextID)));
|
||||
}
|
||||
|
||||
if ((wantedRealAppIDs?.Count == 0) || (unwantedRealAppIDs?.Count == 0) || (wantedTypes?.Count == 0)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes));
|
||||
|
||||
return (false, string.Format(Strings.ErrorObjectIsNull, nameof(wantedRealAppIDs) + " || " + nameof(unwantedRealAppIDs) + " || " + nameof(wantedTypes)));
|
||||
}
|
||||
|
||||
return await SendInventory(appID, contextID, targetSteamID, tradeToken, item => (wantedRealAppIDs?.Contains(item.RealAppID) != false) && (unwantedRealAppIDs?.Contains(item.RealAppID) != true) && (wantedTypes?.Contains(item.Type) != false)).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
public (bool Success, string Message) Start() {
|
||||
if (Bot.KeepRunning) {
|
||||
|
||||
@@ -121,37 +121,6 @@ namespace ArchiSteamFarm {
|
||||
return string.IsNullOrEmpty(VanityURL) ? "/profiles/" + Bot.SteamID : "/id/" + VanityURL;
|
||||
}
|
||||
|
||||
[ItemCanBeNull]
|
||||
[Obsolete]
|
||||
[PublicAPI]
|
||||
public async Task<HashSet<Steam.Asset>> GetInventory(ulong steamID = 0, uint appID = Steam.Asset.SteamAppID, ulong contextID = Steam.Asset.SteamCommunityContextID, bool? marketable = null, bool? tradable = null, IReadOnlyCollection<uint> wantedRealAppIDs = null, IReadOnlyCollection<uint> unwantedRealAppIDs = null, IReadOnlyCollection<Steam.Asset.EType> wantedTypes = null, IReadOnlyCollection<(uint RealAppID, Steam.Asset.EType Type, Steam.Asset.ERarity Rarity)> wantedSets = null) {
|
||||
if ((appID == 0) || (contextID == 0)) {
|
||||
Bot.ArchiLogger.LogNullError(nameof(appID) + " || " + nameof(contextID));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Bot.ArchiLogger.LogGenericWarning(string.Format(Strings.WarningDeprecated, nameof(GetInventory) + " (" + nameof(Plugins) + ")", nameof(GetInventoryAsync)));
|
||||
|
||||
try {
|
||||
return await GetInventoryAsync(steamID, appID, contextID).Where(
|
||||
item =>
|
||||
(!marketable.HasValue || (item.Marketable == marketable.Value)) &&
|
||||
(!tradable.HasValue || (item.Tradable == tradable.Value)) &&
|
||||
(wantedRealAppIDs?.Contains(item.RealAppID) != false) &&
|
||||
(unwantedRealAppIDs?.Contains(item.RealAppID) != true) &&
|
||||
(wantedTypes?.Contains(item.Type) != false) &&
|
||||
(wantedSets?.Contains((item.RealAppID, item.Type, item.Rarity)) != false)
|
||||
).ToHashSetAsync().ConfigureAwait(false);
|
||||
} catch (HttpRequestException) {
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
Bot.ArchiLogger.LogGenericException(e);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[JetBrains.Annotations.NotNull]
|
||||
[PublicAPI]
|
||||
[SuppressMessage("ReSharper", "FunctionComplexityOverflow")]
|
||||
|
||||
Reference in New Issue
Block a user