save tutorial completion

This commit is contained in:
Mikhail Thompson
2024-06-28 08:09:32 +03:00
parent cef8ce059f
commit 91a6ee3b3d
3 changed files with 15 additions and 2 deletions

View File

@@ -25,6 +25,8 @@ namespace nksrv.LobbyServer.Msgs.User
response.User.LobbyJukebox = 2;
response.ResetHour = 20;
response.Nickname = user.Nickname;
response.SynchroLv = 1;
response.OutpostBattleLevel = new NetOutpostBattleLevel() { Level = 1 };
response.OutpostBattleTime = new NetOutpostBattleTime() { MaxBattleTime = 864000000000, MaxOverBattleTime = 12096000000000 };
if (user.TeamData.Slots.Count == 0)
@@ -83,6 +85,14 @@ namespace nksrv.LobbyServer.Msgs.User
response.LastClearedNormalMainStageId = user.LastStageCleared;
// Restore completed tutorials. GroupID is the first 4 digits of the Table ID.
foreach (var item in user.ClearedTutorials)
{
var groupId = int.Parse(item.ToString().Substring(0, 4));
int tutorialVersion = item == 1020101 ? 1 : 0; // TODO
response.User.Tutorials.Add(new NetTutorialData() { GroupId = groupId, LastClearedTid = item, LastClearedVersion = tutorialVersion });
}
WriteData(response);
}
}