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.
|
|
|
using System;
|
|
|
|
namespace ET
|
|
|
|
{
|
|
|
|
public class C2M_ConstructFinishHandler: AMActorLocationRpcHandler<Unit, C2M_ConstructFinish, M2C_ConstructFinish>
|
|
|
|
{
|
|
|
|
protected async override ETTask Run(Unit unit, C2M_ConstructFinish request, M2C_ConstructFinish response, Action reply)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
var (building,childId) = ConstructOperate.ConstructFinish(unit, request.ConstructId);
|
|
|
|
response.Error = ErrorCode.ERR_Success;
|
|
|
|
reply();
|
|
|
|
ConstructHelper.NotifyConstructFinish(unit,request.ConstructId, building.Id,0);
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
{
|
|
|
|
response.Message = e.ToString();
|
|
|
|
response.Error = ErrorCode.ERR_OperateFail;
|
|
|
|
reply();
|
|
|
|
}
|
|
|
|
|
|
|
|
await ETTask.CompletedTask;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|