basic reward system working

This commit is contained in:
Mikhail Thompson
2024-06-28 13:48:43 +03:00
parent 91a6ee3b3d
commit 28f6473bb9
9 changed files with 148 additions and 10 deletions

View File

@@ -34,9 +34,17 @@ namespace nksrv.LobbyServer.Msgs.User
{
response.Currency.Add(new NetUserCurrencyData() { Type = (int)item.Key, Value = item.Value });
}
response.RepresentationTeam = user.TeamData;
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);
}
}