Downloading to use new instance locale and account
This commit is contained in:
parent
2e5360f0ba
commit
714bb2ba50
6 changed files with 23 additions and 16 deletions
|
|
@ -13,7 +13,7 @@
|
|||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
|
||||
<Version>3.1.12.194</Version>
|
||||
<Version>3.1.12.196</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -136,11 +136,12 @@ namespace LibationLauncher
|
|||
|
||||
private static Account addAccountToNewAccountFile()
|
||||
{
|
||||
// get locale from settings file
|
||||
// get required locale from settings file
|
||||
var settingsContents = File.ReadAllText(Configuration.Instance.SettingsFilePath);
|
||||
var jObj = JObject.Parse(settingsContents);
|
||||
var jLocale = jObj.Property("LocaleCountryCode");
|
||||
var localeName = jLocale.Value.Value<string>();
|
||||
if (!JObject.Parse(settingsContents).TryGetValue("LocaleCountryCode", out var jLocale))
|
||||
return null;
|
||||
|
||||
var localeName = jLocale.Value<string>();
|
||||
var locale = Localization.Get(localeName);
|
||||
|
||||
var api = EzApiCreator.GetApiAsync(locale, AccountsSettingsFileLegacy30).GetAwaiter().GetResult();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue