add password field

This commit is contained in:
CWX
2025-01-19 20:13:51 +00:00
parent 263f868cdb
commit 8714e0761f
2 changed files with 6 additions and 1 deletions
@@ -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,
@@ -36,4 +36,7 @@ public record MiniProfile
[JsonPropertyName("sptData")]
public Profile.Spt? SptData { get; set; }
[JsonPropertyName("hasPassword")]
public bool? HasPassword { get; set; }
}