From 2d9abd00f5b5bd0a46b4c5a83af16be15ac94fda Mon Sep 17 00:00:00 2001 From: Kyle Belanger Date: Sat, 13 Apr 2024 02:02:40 -0400 Subject: [PATCH] Stubs for equipment scrapping and CUB combining to prevent softlocks --- AscNet.GameServer/Handlers/EquipModule.cs | 20 ++++++++++++- AscNet.GameServer/Handlers/PartnerModule.cs | 31 +++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 AscNet.GameServer/Handlers/PartnerModule.cs diff --git a/AscNet.GameServer/Handlers/EquipModule.cs b/AscNet.GameServer/Handlers/EquipModule.cs index fb6ba9ad..4813cdad 100644 --- a/AscNet.GameServer/Handlers/EquipModule.cs +++ b/AscNet.GameServer/Handlers/EquipModule.cs @@ -96,6 +96,18 @@ namespace AscNet.GameServer.Handlers public int Level; public int Exp; } + + [MessagePackObject(true)] + public class EquipDecomposeRequest + { + public List EquipIds; + } + + [MessagePackObject(true)] + public class EquipDecomposeResponse + { + public int Code; + } #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. #endregion @@ -333,5 +345,11 @@ namespace AscNet.GameServer.Handlers session.SendResponse(new EquipResonanceResponse() { ResonanceData = resonance }, packet.Id); } + + [RequestPacketHandler("EquipDecomposeRequest")] + public static void EquipDecomposeRequestHandler(Session session, Packet.Request packet) + { + session.SendResponse(new EquipDecomposeResponse() { Code = 1 }, packet.Id); + } } -} +} \ No newline at end of file diff --git a/AscNet.GameServer/Handlers/PartnerModule.cs b/AscNet.GameServer/Handlers/PartnerModule.cs new file mode 100644 index 00000000..e9579d16 --- /dev/null +++ b/AscNet.GameServer/Handlers/PartnerModule.cs @@ -0,0 +1,31 @@ +using MessagePack; + +namespace AscNet.GameServer.Handlers +{ + + #region MsgPackScheme +#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + [MessagePackObject(true)] + public class PartnerComposeRequest + { + public List TemplateIds; + public bool IsOneKey; + } + + [MessagePackObject(true)] + public class PartnerComposeResponse + { + public int Code; + } +#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + #endregion + + internal class PartnerModule + { + [RequestPacketHandler("PartnerComposeRequest")] + public static void PartnerComposeRequestHandler(Session session, Packet.Request packet) + { + session.SendResponse(new PartnerComposeResponse() { Code = 1 }, packet.Id); + } + } +}