using System.Collections.Generic; using Fort23.UTool; using GameLogic.Bag; namespace Fort23.Mono { [UIBinding(prefab = "EqRecyclePanel" )] public partial class EqRecyclePanel : UIPanel { private string poolName = "eqItem"; private void Init() { } protected override void AddEvent() { } protected override void DelEvent() { } public override void AddButtonEvent() { btnBack.onClick.AddListener(OnclickClose); } private void OnclickClose() { UIManager.Instance.HideUIUIPanel(this); UIManager.Instance.DormancyAllGComponent(poolName); } public async void InitEqRecyclePanel() { // GameObject eqGo = eqsUIObj[0] as GameObject; foreach (KeyValuePair>> keyValuePair in PlayerManager.Instance.eqController.allZyEqDic) { foreach (KeyValuePair> valuePair in keyValuePair.Value) { foreach (ItemInfo itemInfo in valuePair.Value) { if (itemInfo.eqInfo == null) { continue; } if (itemInfo.count.Value == 0) { LogTool.Log("装备只有1个,而且被穿了:" + itemInfo.eqInfo.isEquip); if (!itemInfo.eqInfo.isEquip) { LogTool.Log("不应该出现,数量为0的装备还未穿戴?需要检查:eqConfigID" + itemInfo.eqInfo.basicEquipConfig.ID + "| itemID:" + itemInfo.itemID + "| guid:" + itemInfo.guid); } continue; } WidgetItem widgetItem = await UIManager.Instance. CreateGComponentForObject(eqItem, null, isInstance : true, poolName:poolName, root:itemRoot); widgetItem.InitWidget(itemInfo); } } } } } }