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
700 B
27 lines
700 B
3 years ago
|
using System;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
|
||
|
public class C2M_FarmlandPlantHandler: AMActorLocationRpcHandler<Unit, C2M_FarmlandPlant, M2C_FarmlandPlant>
|
||
|
{
|
||
|
protected override async ETTask Run(Unit unit, C2M_FarmlandPlant request, M2C_FarmlandPlant response, Action reply)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
response.Error=FarmlandOperate.Plant(unit, request.FarmlandId);
|
||
|
reply();
|
||
|
}
|
||
|
catch (Exception e)
|
||
|
{
|
||
|
response.Message = e.ToString();
|
||
|
response.Error = ErrorCode.ERR_OperateFail;
|
||
|
reply();
|
||
|
}
|
||
|
|
||
|
await ETTask.CompletedTask;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|