using System; namespace ET { public class C2M_FarmlandSeedHandler: AMActorLocationRpcHandler { protected override async ETTask Run(Unit unit, C2M_FarmlandSeed request, M2C_FarmlandSeed response, Action reply) { try { (response.FarmlandIds, response.CropCfgIds) = FarmlandOperate.FarmlandSeed(unit, request.FarmlandIds, request.CropCfgIds); response.Error = ErrorCode.ERR_Success; reply(); } catch (Exception e) { response.Message = e.ToString(); response.Error = ErrorCode.ERR_OperateFail; reply(); } await ETTask.CompletedTask; } } }