22 lines
548 B
C#
22 lines
548 B
C#
|
using System;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
[ActorMessageHandler]
|
|||
|
public class C2M_FindFriendHandler : AMActorLocationRpcHandler<Unit, C2M_FindFriend, M2C_FindFriend>
|
|||
|
{
|
|||
|
protected override async ETTask Run(Unit unit, C2M_FindFriend request, M2C_FindFriend response, Action reply)
|
|||
|
{
|
|||
|
var (ret,id) = await FriendComponent.Instance.FindFriend(request.Name);
|
|||
|
if (!ret.Equals(string.Empty))
|
|||
|
{
|
|||
|
response.Message = ret;
|
|||
|
reply();
|
|||
|
return;
|
|||
|
}
|
|||
|
response.Id = id;
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|