using System; namespace ET { [ActorMessageHandler] public class C2M_PutOnHandler : AMActorLocationRpcHandler { protected override async ETTask Run(Unit unit, C2M_PutOn request, M2C_PutOn response, Action reply) { Bag bag = unit.GetComponent(); 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; } } }