24 lines
846 B
C#
24 lines
846 B
C#
|
using System;
|
|||
|
|
|||
|
namespace ET
|
|||
|
{
|
|||
|
[ActorMessageHandler]
|
|||
|
public class C2M_PutOnHandler : AMActorLocationRpcHandler<Unit, C2M_PutOn, M2C_PutOn>
|
|||
|
{
|
|||
|
protected override async ETTask Run(Unit unit, C2M_PutOn request, M2C_PutOn response, Action reply)
|
|||
|
{
|
|||
|
Bag bag = unit.GetComponent<Bag>();
|
|||
|
string retStr = bag.Puton(request.Index);
|
|||
|
if (retStr == string.Empty)
|
|||
|
{
|
|||
|
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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|