diff --git a/ASFEnhance/AssemblyInfo.cs b/ASFEnhance/AssemblyInfo.cs
index 903939af..c6d608ea 100644
--- a/ASFEnhance/AssemblyInfo.cs
+++ b/ASFEnhance/AssemblyInfo.cs
@@ -1,8 +1,8 @@
using System.Reflection;
[assembly: System.CLSCompliant(false)]
-[assembly: AssemblyVersion("1.5.16.287")]
-[assembly: AssemblyFileVersion("1.5.16.287")]
+[assembly: AssemblyVersion("1.5.17.289")]
+[assembly: AssemblyFileVersion("1.5.17.289")]
[assembly: AssemblyCopyright("Copyright © 2022 Chr_")]
[assembly: AssemblyProduct("ASFEnhance")]
diff --git a/ASFEnhance/Cart/WebRequest.cs b/ASFEnhance/Cart/WebRequest.cs
index 9cd29da8..022a8a83 100644
--- a/ASFEnhance/Cart/WebRequest.cs
+++ b/ASFEnhance/Cart/WebRequest.cs
@@ -30,20 +30,24 @@ internal static class WebRequest
return HtmlParser.ParseCertPage(response);
}
+ ///
+ /// 添加到购物车
+ ///
+ ///
+ ///
+ ///
internal static async Task AddCert(Bot bot, SteamGameID gameID)
{
- switch (gameID.Type)
+ if(gameID.Type == SteamGameIDType.Sub || gameID.Type == SteamGameIDType.Bundle)
{
- case SteamGameIDType.Sub:
- return await AddCert(bot, gameID.GameID, false).ConfigureAwait(false);
- case SteamGameIDType.Bundle:
- return await AddCert(bot, gameID.GameID, true).ConfigureAwait(false);
- default:
- return null;
+ return await AddCert(bot, gameID.GameID, gameID.Type == SteamGameIDType.Bundle).ConfigureAwait(false);
+ }
+ else
+ {
+ return null;
}
}
-
///
/// 添加到购物车
///
@@ -380,12 +384,18 @@ internal static async Task CartSetCountry(Bot bot, string countryCode)
ObjectResponse response2 = await bot.ArchiWebHandler.UrlGetToJsonObjectWithSession(request, referer: referer).ConfigureAwait(false);
- if (response2 == null)
+ if (response == null)
{
bot.ArchiLogger.LogNullError(nameof(response));
return null;
}
+ if (response2 == null)
+ {
+ bot.ArchiLogger.LogNullError(nameof(response2));
+ return null;
+ }
+
return response2;
}
}