From 21893163811a7f97f45b92b684fc95fd200eea7a Mon Sep 17 00:00:00 2001 From: Kyle Belanger Date: Sun, 14 Apr 2024 08:09:44 -0400 Subject: [PATCH] UseCdKeyResponse stuff --- AscNet.GameServer/Game/DrawManager.cs | 5 ++--- AscNet.GameServer/Game/Fight.cs | 5 ----- AscNet.GameServer/Handlers/AccountModule.cs | 10 +++++++++- AscNet.GameServer/Handlers/Drops/DropsHandler.cs | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/AscNet.GameServer/Game/DrawManager.cs b/AscNet.GameServer/Game/DrawManager.cs index 1f468c95..23fd4aed 100644 --- a/AscNet.GameServer/Game/DrawManager.cs +++ b/AscNet.GameServer/Game/DrawManager.cs @@ -8,7 +8,6 @@ using AscNet.Table.V2.share.character; using AscNet.Table.V2.share.character.quality; using AscNet.Table.V2.share.equip; using AscNet.Table.V2.share.item; -using System; namespace AscNet.GameServer.Game { @@ -447,10 +446,10 @@ namespace AscNet.GameServer.Game } break; case 2: - // Weapon + // TODO: Weapon gacha break; case 3: - // CUB + // TODO: CUB gacha break; default: break; diff --git a/AscNet.GameServer/Game/Fight.cs b/AscNet.GameServer/Game/Fight.cs index d44c74c6..7ab4f9a1 100644 --- a/AscNet.GameServer/Game/Fight.cs +++ b/AscNet.GameServer/Game/Fight.cs @@ -1,9 +1,4 @@ using AscNet.Common.MsgPack; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace AscNet.GameServer.Game { diff --git a/AscNet.GameServer/Handlers/AccountModule.cs b/AscNet.GameServer/Handlers/AccountModule.cs index 3e1695bc..9dd937a9 100644 --- a/AscNet.GameServer/Handlers/AccountModule.cs +++ b/AscNet.GameServer/Handlers/AccountModule.cs @@ -28,10 +28,18 @@ namespace AscNet.GameServer.Handlers public string Id; } + [MessagePackObject(true)] + public class CdKeyRewardGoods + { + public RewardType RewardType; + public int TemplateId; + } + [MessagePackObject(true)] public class UseCdKeyResponse { public int Code; + public List? RewardGoods; } #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. #endregion @@ -144,7 +152,7 @@ namespace AscNet.GameServer.Handlers [RequestPacketHandler("UseCdKeyRequest")] public static void UseCdKeyRequestHandler(Session session, Packet.Request packet) { - session.SendResponse(new UseCdKeyResponse() { Code = 1 }, packet.Id); + session.SendResponse(new UseCdKeyResponse() { Code = 20054001 }, packet.Id); } // TODO: Move somewhere else, also split. diff --git a/AscNet.GameServer/Handlers/Drops/DropsHandler.cs b/AscNet.GameServer/Handlers/Drops/DropsHandler.cs index b5a9a92c..6b28d741 100644 --- a/AscNet.GameServer/Handlers/Drops/DropsHandler.cs +++ b/AscNet.GameServer/Handlers/Drops/DropsHandler.cs @@ -182,9 +182,9 @@ namespace AscNet.GameServer.Handlers.Drops #endregion /// - /// Progressive chance of getting the item based on item quality and commandant level + /// TODO: Progressive chance of getting the item based on item quality and commandant level /// - private static bool GetProgressiveChance(int level, int quality) + static bool GetProgressiveChance(int level, int quality) { return true; }