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

21 lines
572 B
C#

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_LeaveFamilyHandler : AMActorLocationRpcHandler<Unit, C2M_LeaveFamily, M2C_LeaveFamily>
{
protected override async ETTask Run(Unit unit, C2M_LeaveFamily request, M2C_LeaveFamily response, Action reply)
{
string ret = await FamilyComponent.Instance.LeaveFamily(unit.Id);
if (ret != null)
{
response.Message = ret;
reply();
return;
}
reply();
await ETTask.CompletedTask;
}
}
}