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

22 lines
568 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_UpgradeHandler : AMActorLocationRpcHandler<Unit, C2M_Upgrade, M2C_Upgrade>
{
protected override async ETTask Run(Unit unit, C2M_Upgrade request, M2C_Upgrade response, Action reply)
{
2021-04-11 19:50:39 +08:00
string ret = await ItemComponent.Instance.UpgradeItem(unit, request.Index);
2021-04-08 20:09:59 +08:00
if (!ret.Equals(string.Empty))
{
response.Message = ret;
reply();
return;
}
BagHelper.GetBagInfo(unit, response.BagMapList);
reply();
await ETTask.CompletedTask;
}
}
}