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

22 lines
557 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
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)
{
2021-04-11 19:50:39 +08:00
(string ret, long id) = await FriendComponent.Instance.FindFriend(request.Name);
2021-04-08 20:09:59 +08:00
if (!ret.Equals(string.Empty))
{
response.Message = ret;
reply();
return;
}
response.Id = id;
reply();
await ETTask.CompletedTask;
}
}
}