From 1d03d1117e6c7128e959da992de1614b7c879993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=8C=90=EB=8F=8C?= Date: Sat, 9 Mar 2024 20:24:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=86=A0=EC=BD=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/SQL/DeckUnitInfo.cs | 1 + Server/Service/BuyShopGacha.cs | 44 ++++++++++++++++++++++++++++++++++ Server/Service/UseItem.cs | 44 ++++++++++++++++++++++++++++++++++ Server/System/Enums.cs | 2 ++ 4 files changed, 91 insertions(+) create mode 100644 Server/Service/BuyShopGacha.cs create mode 100644 Server/Service/UseItem.cs diff --git a/Server/SQL/DeckUnitInfo.cs b/Server/SQL/DeckUnitInfo.cs index 1459161..a986e14 100644 --- a/Server/SQL/DeckUnitInfo.cs +++ b/Server/SQL/DeckUnitInfo.cs @@ -17,6 +17,7 @@ namespace Server.SQL public long equip3_id { get; set; } public long equip4_id { get; set; } public long equip5_id { get; set; } + [JsonIgnore] public int level { get; set; } public long exp { get; set; } public long count { get; set; } diff --git a/Server/Service/BuyShopGacha.cs b/Server/Service/BuyShopGacha.cs new file mode 100644 index 0000000..5369b3b --- /dev/null +++ b/Server/Service/BuyShopGacha.cs @@ -0,0 +1,44 @@ +using Server.System; +using Newtonsoft.Json; + +namespace Server.Service +{ + public class BuyShopGacha : AbstractService + { + private BuyShopGachaReq req; + public override string Process() + { + return makeResp(); + } + + public override Protocol ProtocolValue() => Protocol.BuyShopGacha; + + public override Req Requst(string json) + { + req = JsonConvert.DeserializeObject(json); + return req; + } + + private string makeResp() + { + BuyShopGachaResp resp = new BuyShopGachaResp(); + resp.status = 200; + return resp.ToJson(); + } + + + } + + public class BuyShopGachaReq : Req + { + public override bool IsReceivedAllField() + { + return true; + } + } + + public class BuyShopGachaResp : Resp + { + + } +} diff --git a/Server/Service/UseItem.cs b/Server/Service/UseItem.cs new file mode 100644 index 0000000..91c08b1 --- /dev/null +++ b/Server/Service/UseItem.cs @@ -0,0 +1,44 @@ +using Server.System; +using Newtonsoft.Json; + +namespace Server.Service +{ + public class UseItem : AbstractService + { + private UseItemReq req; + public override string Process() + { + return makeResp(); + } + + public override Protocol ProtocolValue() => Protocol.UseItem; + + public override Req Requst(string json) + { + req = JsonConvert.DeserializeObject(json); + return req; + } + + private string makeResp() + { + UseItemResp resp = new UseItemResp(); + resp.status = 200; + return resp.ToJson(); + } + + + } + + public class UseItemReq : Req + { + public override bool IsReceivedAllField() + { + return true; + } + } + + public class UseItemResp : Resp + { + + } +} diff --git a/Server/System/Enums.cs b/Server/System/Enums.cs index 70d3220..c78ddf9 100644 --- a/Server/System/Enums.cs +++ b/Server/System/Enums.cs @@ -17,6 +17,8 @@ NicknameChange = 202,//닉네임 변경 BuyShopItem = 300,//상점 아이템 구매 + BuyShopGacha = 301,//가챠 아이탬 사용 + UseItem = 302,//소모품 사용 } public enum Error