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.
 
 
 
 
 
 

35 lines
1001 B

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_StopGatherHandler: AMActorLocationRpcHandler<Unit, C2M_StopGather, M2C_StopGather>
{
protected async override ETTask Run(Unit unit, C2M_StopGather request, M2C_StopGather response, Action reply)
{
try
{
var people = unit.GetComponent<PeopleComponent>().GetChild<People>(request.PeopleId);
if (people == null)
{
response.Error= ErrorCode.ERR_PeopleNotFound;
}
else
{
response.Error = PeopleOperate.StopBehave(unit, people);
}
reply();
}
catch (Exception e)
{
response.Error = ErrorCode.ERR_StopGatherFail;
response.Message = e.Message;
reply();
}
await ETTask.CompletedTask;
}
}
}