CTT/Server/Hotfix/Game/Handler/UI/Bag/C2M_ChangeItemPosHandler.cs

21 lines
672 B
C#

using System;
namespace ET
{
[ActorMessageHandler]
public class C2M_ChangeItemPosHandler : AMActorLocationRpcHandler<Unit, C2M_ChangeItemPos, M2C_ChangeItemPos>
{
protected override async ETTask Run(Unit unit, C2M_ChangeItemPos request, M2C_ChangeItemPos response, Action reply)
{
Bag bag = unit.GetComponent<Bag>();
string retStr = bag.ChangePos(request.Pos1, request.Pos2);
if (retStr == "")
{
BagHelper.GetBagInfo(unit, response.BagMapList);
}
response.Message = retStr;
reply();
await ETTask.CompletedTask;
}
}
}