sim room opens, fix tutorial saving

This commit is contained in:
Mikhail
2024-07-05 10:16:29 -04:00
parent b4cc603343
commit 5036097c9d
5 changed files with 106 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using nksrv.Utils;
using Google.Protobuf.WellKnownTypes;
using nksrv.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -14,7 +15,17 @@ namespace nksrv.LobbyServer.Msgs.Simroom
{
var req = await ReadData<ReqGetSimRoom>();
var response = new ResGetSimRoom();
var response = new ResGetSimRoom() {
OverclockData = new() {
CurrentSeasonData = new() {
SeasonStartDate = Timestamp.FromDateTimeOffset(DateTime.UtcNow),
SeasonEndDate = Timestamp.FromDateTimeOffset(DateTime.UtcNow.AddDays(7))
},
CurrentSeasonHighScore = new(),
CurrentSubSeasonHighScore = new(),
LatestOption = new()
},
NextLegacyBuffResetDate = Timestamp.FromDateTimeOffset(DateTime.UtcNow.AddDays(7)) };
// TODO
WriteData(response);
}

View File

@@ -39,7 +39,7 @@ namespace nksrv.LobbyServer.Msgs.User
int groupId = item.Value.GroupId;
int version = item.Value.VersionGroup;
response.User.Tutorials.Add(new NetTutorialData() { GroupId = groupId, LastClearedTid = groupId, LastClearedVersion = version });
response.User.Tutorials.Add(new NetTutorialData() { GroupId = groupId, LastClearedTid = item.Key, LastClearedVersion = version });
}
response.CommanderRoomJukeboxBgm = new NetJukeboxBgm() { JukeboxTableId = 2, Type = NetJukeboxBgmType.JukeboxTableId, Location = NetJukeboxLocation.CommanderRoom };

View File

@@ -19,6 +19,7 @@ namespace nksrv.LobbyServer.Msgs.User.Tutorial
if (!user.ClearedTutorialData.ContainsKey(req.LastClearedTid))
{
var cleared = StaticDataParser.Instance.GetTutorialDataById(req.LastClearedTid);
cleared.id = req.LastClearedTid;
user.ClearedTutorialData.Add(req.LastClearedTid, cleared);
}
JsonDb.Save();