From a5852320459e6a48fb3a765d8ab33659e1f92660 Mon Sep 17 00:00:00 2001 From: Kei-Luna Date: Tue, 19 May 2026 17:46:53 +0900 Subject: [PATCH] small fix --- .../BossPvpShared.cs => Game/BossPvp/BossPvpService.cs} | 8 +++----- .../CallGS/Handlers/BossPvp/BossPvpLogic_EnterLevel.cs | 4 +++- .../CallGS/Handlers/BossPvp/BossPvpLogic_GetOpenID.cs | 4 +++- .../CallGS/Handlers/BossPvp/BossPvpLogic_GetReward.cs | 4 +++- .../CallGS/Handlers/BossPvp/BossPvpLogic_LevelFail.cs | 4 +++- .../CallGS/Handlers/BossPvp/BossPvpLogic_LevelMopup.cs | 4 +++- .../Handlers/BossPvp/BossPvpLogic_LevelSettlement.cs | 4 +++- .../Server/CallGS/Handlers/BossPvp/BossPvpLogic_Record.cs | 4 +++- .../Handlers/Chapter/Chapter_DealLevelSettlement.cs | 6 +++--- 9 files changed, 27 insertions(+), 15 deletions(-) rename GameServer/{Server/CallGS/Handlers/BossPvp/BossPvpShared.cs => Game/BossPvp/BossPvpService.cs} (98%) diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpShared.cs b/GameServer/Game/BossPvp/BossPvpService.cs similarity index 98% rename from GameServer/Server/CallGS/Handlers/BossPvp/BossPvpShared.cs rename to GameServer/Game/BossPvp/BossPvpService.cs index f218fbd..2914a9f 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpShared.cs +++ b/GameServer/Game/BossPvp/BossPvpService.cs @@ -2,16 +2,15 @@ using MikuSB.Data; using MikuSB.Data.Excel; using MikuSB.Database.Inventory; using MikuSB.GameServer.Game.Player; -using MikuSB.GameServer.Server.CallGS; using MikuSB.Proto; using System.Globalization; using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; -namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; +namespace MikuSB.GameServer.Game.BossPvp; -internal static class BossPvpShared +internal static class BossPvpService { private const uint GroupId = 51; private const uint ActivitySubId = 0; @@ -27,9 +26,8 @@ internal static class BossPvpShared DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull }; - public static async ValueTask<(object Response, NtfSyncPlayer Sync)> HandleGetOpenIdAsync(Connection connection) + public static async ValueTask<(object Response, NtfSyncPlayer Sync)> HandleGetOpenIdAsync(PlayerInstance player) { - var player = connection.Player!; await EnsureBossLineupsAsync(player); var sync = new NtfSyncPlayer(); diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_EnterLevel.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_EnterLevel.cs index d057184..2a011e2 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_EnterLevel.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_EnterLevel.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_EnterLevel")] @@ -5,7 +7,7 @@ public class BossPvpLogic_EnterLevel : ICallGSHandler { public async Task Handle(Connection connection, string param, ushort seqNo) { - var response = BossPvpShared.HandleEnterLevel(param); + var response = BossPvpService.HandleEnterLevel(param); await CallGSRouter.SendScript(connection, "BossPvpLogic_EnterLevel", System.Text.Json.JsonSerializer.Serialize(response)); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetOpenID.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetOpenID.cs index 61e5bc9..aa959a0 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetOpenID.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetOpenID.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_GetOpenID")] @@ -5,7 +7,7 @@ public class BossPvpLogic_GetOpenID : ICallGSHandler { public async Task Handle(Connection connection, string param, ushort seqNo) { - var (response, sync) = await BossPvpShared.HandleGetOpenIdAsync(connection); + var (response, sync) = await BossPvpService.HandleGetOpenIdAsync(connection.Player!); await CallGSRouter.SendScript(connection, "BossPvpLogic_GetOpenID", System.Text.Json.JsonSerializer.Serialize(response), sync); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetReward.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetReward.cs index 56de685..bba3a86 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetReward.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_GetReward.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_GetReward")] @@ -5,7 +7,7 @@ public class BossPvpLogic_GetReward : ICallGSHandler { public async Task Handle(Connection connection, string param, ushort seqNo) { - var response = BossPvpShared.HandleGetReward(param); + var response = BossPvpService.HandleGetReward(param); await CallGSRouter.SendScript(connection, "BossPvpLogic_GetReward", System.Text.Json.JsonSerializer.Serialize(response)); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelFail.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelFail.cs index 4978947..a44e10d 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelFail.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelFail.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_LevelFail")] @@ -6,7 +8,7 @@ public class BossPvpLogic_LevelFail : ICallGSHandler public async Task Handle(Connection connection, string param, ushort seqNo) { var node = System.Text.Json.Nodes.JsonNode.Parse(param); - var (response, sync) = BossPvpShared.HandleFail(connection.Player!, node); + var (response, sync) = BossPvpService.HandleFail(connection.Player!, node); await CallGSRouter.SendScript(connection, "BossPvpLogic_LevelFail", response.ToJsonString(), sync); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelMopup.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelMopup.cs index 8a1a062..10ec06b 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelMopup.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelMopup.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_LevelMopup")] @@ -5,7 +7,7 @@ public class BossPvpLogic_LevelMopup : ICallGSHandler { public async Task Handle(Connection connection, string param, ushort seqNo) { - var (response, sync) = BossPvpShared.HandleMopup(connection.Player!, param); + var (response, sync) = BossPvpService.HandleMopup(connection.Player!, param); await CallGSRouter.SendScript(connection, "BossPvpLogic_LevelMopup", System.Text.Json.JsonSerializer.Serialize(response), sync); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelSettlement.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelSettlement.cs index 0d0b80e..a7f33d4 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelSettlement.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_LevelSettlement.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_LevelSettlement")] @@ -6,7 +8,7 @@ public class BossPvpLogic_LevelSettlement : ICallGSHandler public async Task Handle(Connection connection, string param, ushort seqNo) { var node = System.Text.Json.Nodes.JsonNode.Parse(param); - var (response, sync) = BossPvpShared.HandleSettlement(connection.Player!, node); + var (response, sync) = BossPvpService.HandleSettlement(connection.Player!, node); await CallGSRouter.SendScript(connection, "BossPvpLogic_LevelSettlement", response.ToJsonString(), sync); } } diff --git a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_Record.cs b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_Record.cs index 5e09ac9..d110b84 100644 --- a/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_Record.cs +++ b/GameServer/Server/CallGS/Handlers/BossPvp/BossPvpLogic_Record.cs @@ -1,3 +1,5 @@ +using MikuSB.GameServer.Game.BossPvp; + namespace MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; [CallGSApi("BossPvpLogic_Record")] @@ -5,7 +7,7 @@ public class BossPvpLogic_Record : ICallGSHandler { public async Task Handle(Connection connection, string param, ushort seqNo) { - var (response, sync) = BossPvpShared.HandleRecord(connection.Player!, param); + var (response, sync) = BossPvpService.HandleRecord(connection.Player!, param); await CallGSRouter.SendScript(connection, "BossPvpLogic_Record", System.Text.Json.JsonSerializer.Serialize(response), sync); } } diff --git a/GameServer/Server/CallGS/Handlers/Chapter/Chapter_DealLevelSettlement.cs b/GameServer/Server/CallGS/Handlers/Chapter/Chapter_DealLevelSettlement.cs index 3fd75c1..64f579c 100644 --- a/GameServer/Server/CallGS/Handlers/Chapter/Chapter_DealLevelSettlement.cs +++ b/GameServer/Server/CallGS/Handlers/Chapter/Chapter_DealLevelSettlement.cs @@ -1,7 +1,7 @@ using System.Text.Json; using System.Text.Json.Nodes; using System.Text.Json.Serialization; -using MikuSB.GameServer.Server.CallGS.Handlers.BossPvp; +using MikuSB.GameServer.Game.BossPvp; using MikuSB.Proto; namespace MikuSB.GameServer.Server.CallGS.Handlers.Chapter; @@ -44,14 +44,14 @@ public class Chapter_DealLevelSettlement : ICallGSHandler if (string.Equals(sCmd, "BossPvpLogic_LevelSettlement", StringComparison.Ordinal)) { - var (response, sync) = BossPvpShared.HandleSettlement(connection.Player!, tbParam); + var (response, sync) = BossPvpService.HandleSettlement(connection.Player!, tbParam); extraSync = sync; return response; } if (string.Equals(sCmd, "BossPvpLogic_LevelFail", StringComparison.Ordinal)) { - var (response, sync) = BossPvpShared.HandleFail(connection.Player!, tbParam); + var (response, sync) = BossPvpService.HandleFail(connection.Player!, tbParam); extraSync = sync; return response; }