12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- 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<WidgetItem>(poolName);
- }
- public async void InitEqRecyclePanel()
- {
- // GameObject eqGo = eqsUIObj[0] as GameObject;
- foreach (KeyValuePair<int,Dictionary<int,List<ItemInfo>>> keyValuePair in PlayerManager.Instance.eqController.allZyEqDic)
- {
- foreach (KeyValuePair<int,List<ItemInfo>> 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<WidgetItem>(eqItem, null, isInstance : true,
- poolName:poolName, root:itemRoot);
- widgetItem.InitWidget(itemInfo);
- }
- }
- }
-
-
-
-
- }
- }
- }
|