using System; namespace ET { public class C2M_CancelConstructHandler:AMActorLocationRpcHandler { protected async override ETTask Run(Unit unit, C2M_CancelConstruct request, M2C_CancelConstruct response, Action reply) { try { response.Error = ConstructOperate.CancelConstruct(unit, request.Id); reply(); } catch (Exception e) { response.Message = e.ToString(); response.Error = ErrorCode.ERR_OperateFail; reply(); } await ETTask.CompletedTask; } } }