CTT/Server/Hotfix/Game/Handler/UI/Friend/C2M_AddFriendHandler.cs

21 lines
581 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_AddFriendHandler : AMActorLocationRpcHandler<Unit, C2M_AddFriend, M2C_AddFriend>
{
protected override async ETTask Run(Unit unit, C2M_AddFriend request, M2C_AddFriend response, Action reply)
{
2021-04-11 19:50:39 +08:00
string ret= await FriendComponent.Instance.AddFriend(unit,request.Id);
2021-04-08 20:09:59 +08:00
if (!ret.Equals(string.Empty))
{
response.Message = ret;
reply();
return;
}
reply();
await ETTask.CompletedTask;
}
}
}