임시 프로토콜 추가

This commit is contained in:
김판돌 2024-03-09 20:24:03 +09:00
parent 453775ea9a
commit 1d03d1117e
4 changed files with 91 additions and 0 deletions

View File

@ -17,6 +17,7 @@ namespace Server.SQL
public long equip3_id { get; set; } public long equip3_id { get; set; }
public long equip4_id { get; set; } public long equip4_id { get; set; }
public long equip5_id { get; set; } public long equip5_id { get; set; }
[JsonIgnore]
public int level { get; set; } public int level { get; set; }
public long exp { get; set; } public long exp { get; set; }
public long count { get; set; } public long count { get; set; }

View File

@ -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<BuyShopGachaReq>(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
{
}
}

44
Server/Service/UseItem.cs Normal file
View File

@ -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<UseItemReq>(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
{
}
}

View File

@ -17,6 +17,8 @@
NicknameChange = 202,//닉네임 변경 NicknameChange = 202,//닉네임 변경
BuyShopItem = 300,//상점 아이템 구매 BuyShopItem = 300,//상점 아이템 구매
BuyShopGacha = 301,//가챠 아이탬 사용
UseItem = 302,//소모품 사용
} }
public enum Error public enum Error