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

21 lines
672 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
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>();
2021-04-11 19:50:39 +08:00
string retStr = bag.ChangePos(request.Pos1, request.Pos2);
2021-04-08 20:09:59 +08:00
if (retStr == "")
{
BagHelper.GetBagInfo(unit, response.BagMapList);
}
response.Message = retStr;
reply();
await ETTask.CompletedTask;
}
}
}