22 lines
694 B
C#
Executable File
22 lines
694 B
C#
Executable File
using System;
|
|
|
|
namespace ET
|
|
{
|
|
[ActorMessageHandler]
|
|
public class C2M_GetStarSoulItemHandler : AMActorLocationRpcHandler<Unit, C2M_GetStarSoulItem, M2C_GetStarSoulItem>
|
|
{
|
|
protected override async ETTask Run(Unit unit, C2M_GetStarSoulItem request, M2C_GetStarSoulItem response, Action reply)
|
|
{
|
|
StarSoulBag bag = unit.GetComponent<StarSoulBag>();
|
|
string retStr = bag.GetStarSoulItemByFragment(request.configId);
|
|
if (retStr == null)
|
|
{
|
|
response.Message = retStr;
|
|
reply();
|
|
return;
|
|
}
|
|
reply();
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
} |