This commit is contained in:
JustArchi
2019-10-05 22:35:39 +02:00
parent b416e30612
commit 97f67711ee
5 changed files with 22 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
<Copyright>Copyright © ArchiSteamFarm 2015-2019</Copyright>
<DefaultItemExcludes>$(DefaultItemExcludes);debug/**;out/**</DefaultItemExcludes>
<ErrorReport>none</ErrorReport>
<LangVersion>latest</LangVersion>
<LangVersion>8.0</LangVersion>
<NoWarn />
<OutputType>Library</OutputType>
<PackageIconUrl>https://github.com/JustArchiNET/ArchiSteamFarm/raw/master/resources/ASF.ico</PackageIconUrl>

View File

@@ -7,7 +7,7 @@
<DefaultItemExcludes>$(DefaultItemExcludes);debug/**;out/**</DefaultItemExcludes>
<Description>ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.</Description>
<ErrorReport>none</ErrorReport>
<LangVersion>latest</LangVersion>
<LangVersion>8.0</LangVersion>
<NoWarn />
<OutputType>Library</OutputType>
<PackageIconUrl>https://github.com/JustArchiNET/ArchiSteamFarm/raw/master/resources/ASF.ico</PackageIconUrl>

View File

@@ -12,7 +12,7 @@
<ErrorReport>none</ErrorReport>
<FileVersion>4.1.0.2</FileVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<LangVersion>8.0</LangVersion>
<NoWarn>1591</NoWarn>
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
<OutputType>Exe</OutputType>

View File

@@ -315,9 +315,9 @@ namespace ArchiSteamFarm {
// ReSharper disable once AccessToDisposedClosure
async () => await iPlayerService.CallAsync(
HttpMethod.Get, "GetOwnedGames", args: new Dictionary<string, object>(3, StringComparer.Ordinal) {
{ "include_appinfo", 1 },
{ "key", steamApiKey },
{ "steamid", steamID }
{ "include_appinfo", 1 },
{ "key", steamApiKey },
{ "steamid", steamID }
}
).ConfigureAwait(false)
).ConfigureAwait(false);
@@ -1367,8 +1367,8 @@ namespace ArchiSteamFarm {
// ReSharper disable once AccessToDisposedClosure
async () => await iEconService.CallAsync(
HttpMethod.Post, "DeclineTradeOffer", args: new Dictionary<string, object>(2, StringComparer.Ordinal) {
{ "key", steamApiKey },
{ "tradeofferid", tradeID }
{ "key", steamApiKey },
{ "tradeofferid", tradeID }
}
).ConfigureAwait(false)
).ConfigureAwait(false);
@@ -1425,11 +1425,11 @@ namespace ArchiSteamFarm {
// ReSharper disable once AccessToDisposedClosure
async () => await iEconService.CallAsync(
HttpMethod.Get, "GetTradeOffers", args: new Dictionary<string, object>(5, StringComparer.Ordinal) {
{ "active_only", 1 },
{ "get_descriptions", 1 },
{ "get_received_offers", 1 },
{ "key", steamApiKey },
{ "time_historical_cutoff", uint.MaxValue }
{ "active_only", 1 },
{ "get_descriptions", 1 },
{ "get_received_offers", 1 },
{ "key", steamApiKey },
{ "time_historical_cutoff", uint.MaxValue }
}
).ConfigureAwait(false)
).ConfigureAwait(false);

View File

@@ -448,8 +448,7 @@ namespace ArchiSteamFarm {
return true;
}
return permission switch
{
return permission switch {
BotConfig.EPermission.FamilySharing when SteamFamilySharingIDs.Contains(steamID) => true,
_ => BotConfig.SteamUserPermissions.TryGetValue(steamID, out BotConfig.EPermission realPermission) && (realPermission >= permission),
};
@@ -1866,15 +1865,14 @@ namespace ArchiSteamFarm {
return false;
}
switch (paymentMethod) {
case EPaymentMethod.ActivationCode:
case EPaymentMethod.Complimentary: // This is also a flag
case EPaymentMethod.GuestPass:
case EPaymentMethod.HardwarePromo:
return false;
default:
return !paymentMethod.HasFlag(EPaymentMethod.Complimentary);
}
// Complimentary is also a flag
return paymentMethod switch {
EPaymentMethod.ActivationCode => false,
EPaymentMethod.Complimentary => false,
EPaymentMethod.GuestPass => false,
EPaymentMethod.HardwarePromo => false,
_ => !paymentMethod.HasFlag(EPaymentMethod.Complimentary)
};
}
private async Task JoinMasterChatGroupID() {