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.
31 lines
874 B
31 lines
874 B
3 years ago
|
using System;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public static class PeopleHelper
|
||
|
{
|
||
|
public static async ETTask<int> Move(Unit unit, long peopleId, float posX, float posY)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
C2M_PeopleMove msg = new C2M_PeopleMove(){PeopleId = peopleId, X = posX, Y = posY};
|
||
|
M2C_PeopleMove resp = await unit.ZoneScene().GetComponent<SessionComponent>().Session.Call(msg) as M2C_PeopleMove;
|
||
|
if (resp.Error != ErrorCode.ERR_Success)
|
||
|
{
|
||
|
Log.Error(resp.Error.ToString());
|
||
|
return resp.Error;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
catch (Exception e)
|
||
|
{
|
||
|
Log.Error(e);
|
||
|
throw;
|
||
|
}
|
||
|
await ETTask.CompletedTask;
|
||
|
|
||
|
return ErrorCode.ERR_Success;
|
||
|
}
|
||
|
}
|
||
|
}
|