mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 04:03:58 +00:00
small fix
This commit is contained in:
@@ -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();
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user