From 8714e0761f8f9c41a61969f3364636e8da5a98a2 Mon Sep 17 00:00:00 2001 From: CWX Date: Sun, 19 Jan 2025 20:13:51 +0000 Subject: [PATCH] add password field --- Libraries/Core/Controllers/ProfileController.cs | 4 +++- Libraries/Core/Models/Eft/Launcher/MiniProfile.cs | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/Core/Controllers/ProfileController.cs b/Libraries/Core/Controllers/ProfileController.cs index d08890ec..a45ddde6 100644 --- a/Libraries/Core/Controllers/ProfileController.cs +++ b/Libraries/Core/Controllers/ProfileController.cs @@ -68,6 +68,7 @@ public class ProfileController( { Username = profile.ProfileInfo?.Username ?? "", Nickname = "unknown", + HasPassword = profile.ProfileInfo.Password != "", Side = "unknown", CurrentLevel = 0, CurrentExperience = 0, @@ -84,9 +85,10 @@ public class ProfileController( { Username = profile.ProfileInfo.Username, Nickname = pmc.Info.Nickname, + HasPassword = profile.ProfileInfo.Password != "", Side = pmc.Info.Side, CurrentLevel = (int)(pmc.Info.Level), - CurrentExperience = (int)(pmc.Info.Experience ?? 0), + CurrentExperience = (pmc.Info.Experience ?? 0), PreviousExperience = currlvl == 0 ? 0 : _profileHelper.GetExperience((int)currlvl), NextLevel = xpToNextLevel, MaxLevel = maxLvl, diff --git a/Libraries/Core/Models/Eft/Launcher/MiniProfile.cs b/Libraries/Core/Models/Eft/Launcher/MiniProfile.cs index 4a97e3e8..40d640ce 100644 --- a/Libraries/Core/Models/Eft/Launcher/MiniProfile.cs +++ b/Libraries/Core/Models/Eft/Launcher/MiniProfile.cs @@ -36,4 +36,7 @@ public record MiniProfile [JsonPropertyName("sptData")] public Profile.Spt? SptData { get; set; } + + [JsonPropertyName("hasPassword")] + public bool? HasPassword { get; set; } }