private void SetWingPreviewCellR() { wingLv wingLvInfoNextDifferent = WingManager.GetWingLvInfoNextDifferent(this.m_current_wingId, this.m_wingLvInfoR.lv); this.m_goBtnArrowR.SetActive(wingLvInfoNextDifferent.model != this.m_wingLvInfoR.model); this.m_WingPreviewCellNext.SetRawImage(this.m_wingLvInfoR.model); this.m_WingPreviewCellNext.SetName(TextColorMgr.GetColorByQuality(this.m_wingLvInfoR.name, this.m_wingLvInfoR.color)); if (wingLvInfoNextDifferent.model == this.m_wingLvInfoR.model && WingManager.IsMaxWingLv(this.m_current_wingId, this.m_current_winglevel)) { this.m_WingPreviewCellNext.SetCondition(true, "已获得最高级"); } else { this.m_WingPreviewCellNext.SetCondition(this.m_wingLvInfoR.lv > this.m_current_winglevel, string.Format(GameDataUtils.GetChineseContent(16301, false), this.m_wingLvInfoR.lv)); } this.m_WingPreviewCellNext.ShowButtonGet(false); }
public static bool IsCanUpgradeWing(int wingId) { int wingLv = WingManager.GetWingLv(wingId); if (wingLv == 0) { return(false); } if (WingManager.IsMaxWingLv(wingId, wingLv)) { return(false); } wingLv wingLvInfo = WingManager.GetWingLvInfo(wingId, wingLv + 1); int key = wingLvInfo.update.get_Item(0).key; int value = wingLvInfo.update.get_Item(0).value; long num = BackpackManager.Instance.OnGetGoodCount(key); return(num >= (long)value); }
public void Refresh() { this.ResetAll(); int wingLv = WingManager.GetWingLv(1); this.SetAttrCurr(1, wingLv > 0); if (wingLv == 0) { this.m_activeRequire.get_gameObject().SetActive(true); this.m_btnActive.get_gameObject().SetActive(true); this.SetActiveRequire(1); Image component = this.m_btnActive.GetComponent <Image>(); if (WingManager.IsCanActiveWing(1)) { this.m_btnActive.GetComponent <Button>().set_enabled(true); ImageColorMgr.SetImageColor(component, false); } else { this.m_btnActive.GetComponent <Button>().set_enabled(false); ImageColorMgr.SetImageColor(component, true); } } else if (WingManager.IsMaxWingLv(1, wingLv)) { this.SetButtonWearAndButtonUndress(); this.m_maxLevelTip.get_gameObject().SetActive(true); } else { this.m_upgradeRequire.get_gameObject().SetActive(true); this.SetButtonWearAndButtonUndress(); this.m_btnUpgrade.get_gameObject().SetActive(true); this.m_attrNext.get_gameObject().SetActive(true); this.SetUpgradeRequire(1); this.SetAttrNext(1); } }