mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-14 07:55:01 +01:00
sim room opens, fix tutorial saving
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user