Pass default username with fallback to "Player" in NameChange script
This commit is contained in:
parent
cdcff1b022
commit
abd8c4cfd1
5 changed files with 11 additions and 4 deletions
|
|
@ -269,7 +269,7 @@ else
|
|||
|
||||
foreach (var manifest in manifests)
|
||||
{
|
||||
await Client.Scripts.RunNameChangeScriptAsync(Game.InstallDirectory, Game.Id, user.Alias);
|
||||
await Client.Scripts.RunNameChangeScriptAsync(Game.InstallDirectory, Game.Id, user.GetUserNameSafe ?? Settings.DEFAULT_GAME_USERNAME);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
User User;
|
||||
Guid AvatarId = Guid.Empty;
|
||||
string Alias = "Player";
|
||||
string Alias = Settings.DEFAULT_GAME_USERNAME;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
User = await UserService.GetCurrentUser();
|
||||
|
||||
AvatarId = User?.Avatar?.Id ?? Guid.Empty;
|
||||
Alias = String.IsNullOrWhiteSpace(User?.Alias) ? User?.UserName ?? "Player" : User.Alias;
|
||||
Alias = String.IsNullOrWhiteSpace(User?.Alias) ? User?.UserName ?? Settings.DEFAULT_GAME_USERNAME : User.Alias;
|
||||
};
|
||||
|
||||
await ProfileService.DownloadProfileInfoAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue