Keep username changes

This commit is contained in:
Kei-Luna
2026-04-28 16:12:27 +09:00
parent ccdfbee828
commit f4ad74e00d
4 changed files with 88 additions and 7 deletions

View File

@@ -43,6 +43,8 @@ public class HandlerReqLogin : Handler
connection.State = SessionStateEnum.WAITING_FOR_LOGIN;
var pd = DatabaseHelper.GetInstance<PlayerGameData>(account.Uid);
connection.Player = pd == null ? new PlayerInstance(account.Uid) : new PlayerInstance(pd);
if (connection.Player.Data.EnsureDisplayName())
DatabaseHelper.UpdateInstance(connection.Player.Data);
connection.DebugFile = Path.Combine(ConfigManager.Config.Path.LogPath, "Debug/", $"{account.Uid}/",
$"Debug-{DateTime.Now:yyyy-MM-dd HH-mm-ss}.log");