fix side story unread

This commit is contained in:
Mikhail Tyukin
2025-12-04 17:20:31 -05:00
parent 2b92e3191b
commit f4e2d82978
9 changed files with 90 additions and 10 deletions

View File

@@ -18,15 +18,15 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
# Install the .NET Core workload # Install the .NET Core workload
- name: Install .NET 9 - name: Install .NET 9
uses: actions/setup-dotnet@v4 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: 9.0.x dotnet-version: 10.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild - name: Setup MSBuild
@@ -42,7 +42,7 @@ jobs:
run: dotnet publish EpinelPS run: dotnet publish EpinelPS
- name: Copy to output - name: Copy to output
run: echo ${{ github.workspace }} && md ${{ github.workspace }}/out/ && xcopy /s /e "${{ github.workspace }}\ServerSelector.Desktop\bin\Release\net9.0\win-x64\publish\" "${{ github.workspace }}\out\" && xcopy /s /e "${{ github.workspace }}\EpinelPS\bin\Release\net9.0\win-x64\publish\" "${{ github.workspace }}\out\" && copy "${{ github.workspace }}\ServerSelector.Desktop\sodium.dll" "${{ github.workspace }}\out\sodium.dll" run: echo ${{ github.workspace }} && md ${{ github.workspace }}/out/ && xcopy /s /e "${{ github.workspace }}\ServerSelector.Desktop\bin\Release\net10.0\win-x64\publish\" "${{ github.workspace }}\out\" && xcopy /s /e "${{ github.workspace }}\EpinelPS\bin\Release\net10.0\win-x64\publish\" "${{ github.workspace }}\out\" && copy "${{ github.workspace }}\ServerSelector.Desktop\sodium.dll" "${{ github.workspace }}\out\sodium.dll"
- name: Upload build artifacts - name: Upload build artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4

View File

@@ -10,7 +10,7 @@
<SelfContained>true</SelfContained> <SelfContained>true</SelfContained>
<IncludeNativeLibrariesForSelfExtract>True</IncludeNativeLibrariesForSelfExtract> <IncludeNativeLibrariesForSelfExtract>True</IncludeNativeLibrariesForSelfExtract>
<NoWarn>$(NoWarn);SYSLIB0057</NoWarn> <NoWarn>$(NoWarn);SYSLIB0057</NoWarn>
<Version>0.135.4.3</Version> <Version>0.140.8.0</Version>
<CETCompat>false</CETCompat> <CETCompat>false</CETCompat>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles> <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -116,8 +116,11 @@ namespace EpinelPS.LobbyServer
msg2.MergeFrom(Contents); msg2.MergeFrom(Contents);
Logging.WriteLine("Reading " + msg2.GetType().Name, LogType.Debug); Logging.WriteLine("Reading " + msg2.GetType().Name, LogType.Debug);
PrintMessage(msg2); if (msg2.GetType().Name != "ReqSyncBadge")
Logging.WriteLine("", LogType.Debug); {
PrintMessage(msg2);
Logging.WriteLine("", LogType.Debug);
}
return msg2; return msg2;
} }
@@ -130,8 +133,11 @@ namespace EpinelPS.LobbyServer
PacketDecryptResponse bin = await PacketDecryption.DecryptOrReturnContentAsync(ctx); PacketDecryptResponse bin = await PacketDecryption.DecryptOrReturnContentAsync(ctx);
msg.MergeFrom(bin.Contents); msg.MergeFrom(bin.Contents);
PrintMessage(msg); if (msg.GetType().Name != "ReqSyncBadge")
Logging.WriteLine("", LogType.Debug); {
PrintMessage(msg);
Logging.WriteLine("", LogType.Debug);
}
UserId = bin.UserId; UserId = bin.UserId;
UsedAuthToken = bin.UsedAuthToken; UsedAuthToken = bin.UsedAuthToken;

View File

@@ -19,6 +19,8 @@ namespace EpinelPS.LobbyServer.Sidestory
response.SideStoryStageDataList.Add(new NetSideStoryStageData() { SideStoryStageId = item, ClearedAt = Timestamp.FromDateTime(DateTime.UtcNow) }); response.SideStoryStageDataList.Add(new NetSideStoryStageData() { SideStoryStageId = item, ClearedAt = Timestamp.FromDateTime(DateTime.UtcNow) });
} }
response.ViewedSideStoryIds.AddRange(user.ViewedSideStoryStages);
await WriteDataAsync(response); await WriteDataAsync(response);
} }
} }

View File

@@ -1,3 +1,4 @@
using EpinelPS.Database;
using EpinelPS.Utils; using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Sidestory namespace EpinelPS.LobbyServer.Sidestory
@@ -12,8 +13,15 @@ namespace EpinelPS.LobbyServer.Sidestory
ResSetViewSideStory response = new(); ResSetViewSideStory response = new();
// TODO foreach (var id in req.ViewedSideStoryIds)
{
if (!user.ViewedSideStoryStages.Contains(id))
{
user.ViewedSideStoryStages.Add(id);
}
}
JsonDb.Save();
await WriteDataAsync(response); await WriteDataAsync(response);
} }
} }

View File

@@ -0,0 +1,21 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Storyline
{
[PacketPath("/storyline/bookmark/get")]
public class GetBookmarks : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqGetStorylineBookmarks req = await ReadData<ReqGetStorylineBookmarks>();
ResGetStorylineBookmarks response = new();
User user = GetUser();
// TODO
await WriteDataAsync(response);
}
}
}

View File

@@ -0,0 +1,21 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Storyline
{
[PacketPath("/storyline/get")]
public class GetStoryline : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqGetStorylineData req = await ReadData<ReqGetStorylineData>();
ResGetStorylineData response = new();
User user = GetUser();
// TODO
await WriteDataAsync(response);
}
}
}

View File

@@ -0,0 +1,21 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Storyline
{
[PacketPath("/storyline/save")]
public class SaveStoryline : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqSaveRecentStoryline req = await ReadData<ReqSaveRecentStoryline>();
ResGetStorylineData response = new();
User user = GetUser();
// TODO
await WriteDataAsync(response);
}
}
}

View File

@@ -84,6 +84,7 @@ public class User
public int GachaTutorialPlayCount = 0; public int GachaTutorialPlayCount = 0;
public List<int> CompletedTacticAcademyLessons = []; public List<int> CompletedTacticAcademyLessons = [];
public List<int> CompletedSideStoryStages = []; public List<int> CompletedSideStoryStages = [];
public List<int> ViewedSideStoryStages = [];
public List<int> Memorial = []; public List<int> Memorial = [];
public List<int> JukeboxBgm = []; public List<int> JukeboxBgm = [];