20 lines
628 B
C#
20 lines
628 B
C#
|
using System;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
[ActorMessageHandler]
|
|||
|
public class C2M_PutonStarSoulItemHandler : AMActorLocationRpcHandler<Unit, C2M_PutonStarSoulItem, M2C_PutonStarSoulItem>
|
|||
|
{
|
|||
|
protected override async ETTask Run(Unit unit, C2M_PutonStarSoulItem request, M2C_PutonStarSoulItem response, Action reply)
|
|||
|
{
|
|||
|
var bag = unit.GetComponent<StarSoulBag>();
|
|||
|
string retStr = bag.PutonItem(request.itemId);
|
|||
|
if (retStr !=null)
|
|||
|
{
|
|||
|
response.Message = retStr;
|
|||
|
}
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|