22 lines
565 B
C#
22 lines
565 B
C#
|
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)
|
|||
|
{
|
|||
|
var ret = await ItemComponent.Instance.UpgradeItem(unit, request.Index);
|
|||
|
if (!ret.Equals(string.Empty))
|
|||
|
{
|
|||
|
response.Message = ret;
|
|||
|
reply();
|
|||
|
return;
|
|||
|
}
|
|||
|
BagHelper.GetBagInfo(unit, response.BagMapList);
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|