2 Commits

Author SHA1 Message Date
Mikhail Tyukin
23afbabfae Compile server for linux 2025-12-04 19:50:22 -05:00
Mikhail Tyukin
f4e2d82978 fix side story unread 2025-12-04 17:20:31 -05:00
9 changed files with 125 additions and 11 deletions

View File

@@ -18,15 +18,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET 9
uses: actions/setup-dotnet@v4
- name: Install .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild
@@ -42,10 +42,44 @@ jobs:
run: dotnet publish EpinelPS
- 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
uses: actions/upload-artifact@v4
with:
name: Server and Server selector
path: ${{ github.workspace }}/out/
serverOnly:
strategy:
matrix:
configuration: [Release]
runs-on: linux-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore packages
run: dotnet restore
- name: Publish Server
run: dotnet publish EpinelPS
- name: Copy to output
run: echo ${{ github.workspace }} && xcopy /s /e "${{ github.workspace }}\EpinelPS\bin\Release\net10.0\linux-x64\publish\" "${{ github.workspace }}\out\"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: EpinelPS_linux_x64
path: ${{ github.workspace }}/out/

View File

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

View File

@@ -116,8 +116,11 @@ namespace EpinelPS.LobbyServer
msg2.MergeFrom(Contents);
Logging.WriteLine("Reading " + msg2.GetType().Name, LogType.Debug);
PrintMessage(msg2);
Logging.WriteLine("", LogType.Debug);
if (msg2.GetType().Name != "ReqSyncBadge")
{
PrintMessage(msg2);
Logging.WriteLine("", LogType.Debug);
}
return msg2;
}
@@ -130,8 +133,11 @@ namespace EpinelPS.LobbyServer
PacketDecryptResponse bin = await PacketDecryption.DecryptOrReturnContentAsync(ctx);
msg.MergeFrom(bin.Contents);
PrintMessage(msg);
Logging.WriteLine("", LogType.Debug);
if (msg.GetType().Name != "ReqSyncBadge")
{
PrintMessage(msg);
Logging.WriteLine("", LogType.Debug);
}
UserId = bin.UserId;
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.ViewedSideStoryIds.AddRange(user.ViewedSideStoryStages);
await WriteDataAsync(response);
}
}

View File

@@ -1,3 +1,4 @@
using EpinelPS.Database;
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Sidestory
@@ -12,8 +13,15 @@ namespace EpinelPS.LobbyServer.Sidestory
ResSetViewSideStory response = new();
// TODO
foreach (var id in req.ViewedSideStoryIds)
{
if (!user.ViewedSideStoryStages.Contains(id))
{
user.ViewedSideStoryStages.Add(id);
}
}
JsonDb.Save();
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 List<int> CompletedTacticAcademyLessons = [];
public List<int> CompletedSideStoryStages = [];
public List<int> ViewedSideStoryStages = [];
public List<int> Memorial = [];
public List<int> JukeboxBgm = [];