CTT/Server/Hotfix/Game/Handler/UI/Famiy/C2M_LeaveFamilyHandler.cs

21 lines
569 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
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)
{
var ret = await FamilyComponent.Instance.LeaveFamily(unit.Id);
if (ret != null)
{
response.Message = ret;
reply();
return;
}
reply();
await ETTask.CompletedTask;
}
}
}