21 lines
578 B
C#
21 lines
578 B
C#
|
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)
|
|||
|
{
|
|||
|
var ret= await FriendComponent.Instance.AddFriend(unit,request.Id);
|
|||
|
if (!ret.Equals(string.Empty))
|
|||
|
{
|
|||
|
response.Message = ret;
|
|||
|
reply();
|
|||
|
return;
|
|||
|
}
|
|||
|
reply();
|
|||
|
await ETTask.CompletedTask;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|