zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Handler/UI/Bag/C2M_SplitItemHandler.cs

22 lines
616 B
C#

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_SplitItemHandler : AMActorLocationRpcHandler<Unit, C2M_SplitItem, M2C_SplitItem>
{
protected override async ETTask Run(Unit unit, C2M_SplitItem request, M2C_SplitItem response, Action reply)
{
Bag bag = unit.GetComponent<Bag>();
string retStr = bag.SplitItem(request.Index, request.Count);
if (retStr == "")
{
BagHelper.GetBagInfo(unit, response.BagMapList);
}
response.Message = retStr;
reply();
await ETTask.CompletedTask;
}
}
}