private void SetBtnClick() { foreach (Transform obj in m_btnGroup) { obj.GetComponent <Button>().interactable = true; obj.Find("mark").gameObject.SetActive(false); obj.GetComponent <Button>().onClick.RemoveAllListeners(); } m_strengBtn.onClick.AddListener(delegate { if (m_strengHint.activeInHierarchy) { var max = moduleEquip.GetLimitIntenLevelByExp(Module_Equip.GetEquipTypeByItem(item), item.GetIntentyLevel(), moduleEquip.GetBagTotalIntentyExp() + item.GetCurrentTotalExp(), item.HasEvolved()); if (max == null) { return; } if (moduleEquip.IntentyRead.ContainsKey(item.itemId)) { moduleEquip.IntentyRead[item.itemId] = max.level; } else { moduleEquip.IntentyRead.Add(item.itemId, max.level); } } moduleEquip.operateItem = item; ShowAsync <Window_Strength>(); }); m_advancedBtn.onClick.AddListener(delegate { if (m_advancedHint.activeInHierarchy) { int leftLevel = item.GetIntentyLevel(); int nextLimitLevel = moduleEquip.GetLimitIntenLevel(Module_Equip.GetEquipTypeByItem(item), leftLevel, true); if (moduleEquip.EvolveRead.ContainsKey(item.itemId)) { moduleEquip.EvolveRead[item.itemId] = nextLimitLevel; } else { moduleEquip.EvolveRead.Add(item.itemId, nextLimitLevel); } } moduleEquip.operateItem = item; ShowAsync <Window_Evolution>(); }); m_soulBtn.onClick.AddListener(delegate { if (m_soulHint.activeInHierarchy) { var wea = ConfigManager.Get <WeaponAttribute>(item.itemTypeId); if (wea != null) { var read = moduleEquip.InsoulLevel(wea.elementId, (int)item.growAttr.equipAttr.expr, item.growAttr.equipAttr.level); if (moduleEquip.InsoulRead.ContainsKey(item.itemId)) { moduleEquip.InsoulRead[item.itemId] = read; } else { moduleEquip.InsoulRead.Add(item.itemId, read); } //记录为已读状态 存储当前可达到的最高级 } } moduleForging.InsoulItem = item.Clone(); ShowAsync <Window_Merge>(); }); m_orderBtn.onClick.AddListener(delegate { if (m_orderHint.activeInHierarchy) { var have = moduleEquip.UpLoadRead.Exists(a => a == item.itemId); if (!have) { moduleEquip.UpLoadRead.Add(item.itemId); } } moduleForging.UpLoadItem = item.Clone(); ShowAsync <Window_Upload>(); }); m_sublimaBtn.onClick.AddListener(delegate { var currentItem = moduleEquip.GetProp(item.itemId); if (moduleFurnace.IsSublimationMax(currentItem)) { moduleGlobal.ShowMessage(249, 20); return; } moduleFurnace.currentSublimationItem = currentItem; ShowAsync <Window_Sublimation>(); }); m_spiritBtn.onClick.AddListener(delegate { moduleFurnace.currentSoulItem = moduleEquip.GetProp(item.itemId); ShowAsync <Window_Soul>(); }); m_btnClearSuit?.onClick.AddListener(delegate { m_clearSuit.Initialize(moduleEquip.GetProp(item.itemId)); }); SetBtnHint(); }