48 lines
947 B
C#
48 lines
947 B
C#
using Server.System;
|
|
using Newtonsoft.Json;
|
|
using Server.SQL;
|
|
|
|
namespace Server.Service
|
|
{
|
|
public class UseItem : AbstractService
|
|
{
|
|
private UseItemReq req;
|
|
public override string Process()
|
|
{
|
|
User user = req.user;
|
|
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();
|
|
return resp.ToJson();
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public class UseItemReq : Req
|
|
{
|
|
public override bool IsReceivedAllField()
|
|
{
|
|
if(uuid == string.Empty)
|
|
return false;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
public class UseItemResp : Resp
|
|
{
|
|
|
|
}
|
|
}
|