using System; namespace ET { [FriendClass(typeof(Unit))] public class C2M_UpgradeScaleHandler: AMActorLocationRpcHandler { protected override async ETTask Run(Unit unit, C2M_UpgradeScale request, M2C_UpgradeScale response, Action reply) { try { UnitOperate.UpgradeScale(unit); response.Scale = unit.Scale; response.Error = ErrorCode.ERR_Success; reply(); } catch (Exception e) { response.Error = ErrorCode.ERR_Success; response.Message = e.ToString(); reply(); } await ETTask.CompletedTask; } } }