21 lines
572 B
C#
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;
|
|
}
|
|
}
|
|
} |