using FL.Data.Items; using System.Collections.Generic; using XGame.Database; using XGame.Framework.Network; namespace FL.Network { public class ActEquipChuanPushCtrl : MsgController { protected override void OnProcess(ActEquipChuanPush message, object context) { //XGame.Log.Info("接受到201301消息ActEquipChuanPushCtrl"); if (message == null) return; List changeEquipPartList = new List(); foreach (var item in message.chuan) { //XGame.Log.Info($"穿上的装备部位:{item.buwei}"); EquipAttr wearEquip = EquipData.Instance.GetWearEquipData((EEquipType)item.buwei); if (wearEquip == null) { wearEquip = new EquipAttr(); } wearEquip.Init(EquipmentTableRepo.Get(item.equipId), wearEquip.Id); wearEquip.Level = item.level; wearEquip.FightingPower = item.power; wearEquip.Attributes.Clear(); foreach (var attr in item.eps) { wearEquip.Attributes.SetValue((EAttributeType)attr.epid, attr.val); } EquipData.Instance.ChangeWearEquipData((EEquipType)item.buwei, wearEquip); changeEquipPartList.Add((EEquipType)item.buwei); } EventSingle.Instance.Notify(EventDefine.OnChangeEquip, changeEquipPartList); } } }