25 lines
811 B
C#
25 lines
811 B
C#
using System;
|
|
|
|
namespace ET
|
|
{
|
|
[ActorMessageHandler]
|
|
public class C2M_TakeoffHandler : AMActorLocationRpcHandler<Unit, C2M_Takeoff, M2C_Takeoff>
|
|
{
|
|
protected override async ETTask Run(Unit unit, C2M_Takeoff request, M2C_Takeoff response, Action reply)
|
|
{
|
|
Bag bag = unit.GetComponent<Bag>();
|
|
string retStr = bag.Takeoff(request.Index);
|
|
if (retStr == "")
|
|
{
|
|
BagHelper.GetBagInfo(unit, response.BagMapList);
|
|
BagHelper.GetWornEquipInfo(unit, response.WornBagMapList);
|
|
//!发送玩家基础性息
|
|
|
|
await Game.EventSystem.Publish(new EventType.ChangeBattleCharacter { unit = unit });
|
|
}
|
|
response.Message = retStr;
|
|
reply();
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
} |