You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
791 B

using System;
namespace ET
{
[FriendClass(typeof(Unit))]
public class C2M_UpgradeScaleHandler: AMActorLocationRpcHandler<Unit, C2M_UpgradeScale, M2C_UpgradeScale>
{
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;
}
}
}