| | |
| | | using Snxxz.UI; |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | |
| | | Text conditionText; |
| | | |
| | | [SerializeField] Text needLvText; |
| | | [SerializeField] |
| | | Text realmTitleText; |
| | | [SerializeField] Image realmImg; |
| | | |
| | | [SerializeField] |
| | | Text itemTypeText; |
| | |
| | | ,itemTipsModel.curAttrData.guid, itemTipsModel.curAttrData.packType,false); |
| | | itemCell.Init(cellModel); |
| | | |
| | | if (itemTipsModel.curAttrData.itemConfig.UseLV > 1) |
| | | { |
| | | conditionText.gameObject.SetActive(true); |
| | | needLvText.gameObject.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | conditionText.gameObject.SetActive(false); |
| | | needLvText.gameObject.SetActive(false); |
| | | } |
| | | |
| | | conditionText.text = Language.Get("KnapS110"); |
| | | needLvText.text = itemTipsModel.curAttrData.itemConfig.UseLV.ToString(); |
| | | if (PlayerDatas.Instance.baseData.LV >= itemTipsModel.curAttrData.itemConfig.UseLV) |
| | | { |
| | | conditionText.color = conditionColor; |
| | | needLvText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | conditionText.color = conditionRedColor; |
| | | needLvText.color = conditionRedColor; |
| | | } |
| | | CheckUselimit(); |
| | | |
| | | if (itemTipsModel.curAttrData.itemConfig.Effect1 != 215) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void CheckUselimit() |
| | | { |
| | | int[] uselimits = itemTipsModel.curAttrData.itemConfig.UseCondiType; |
| | | if (uselimits == null) return; |
| | | |
| | | conditionText.gameObject.SetActive(false); |
| | | needLvText.gameObject.SetActive(false); |
| | | realmTitleText.gameObject.SetActive(false); |
| | | realmImg.gameObject.SetActive(false); |
| | | |
| | | for (int i = 0; i < uselimits.Length; i++) |
| | | { |
| | | switch (uselimits[i]) |
| | | { |
| | | case 0: |
| | | if (itemTipsModel.curAttrData.itemConfig.UseLV > 1) |
| | | { |
| | | conditionText.gameObject.SetActive(true); |
| | | needLvText.gameObject.SetActive(true); |
| | | } |
| | | conditionText.text = Language.Get("KnapS110"); |
| | | needLvText.text = itemTipsModel.curAttrData.itemConfig.UseLV.ToString(); |
| | | |
| | | if (PlayerDatas.Instance.baseData.LV >= itemTipsModel.curAttrData.itemConfig.UseLV) |
| | | { |
| | | conditionText.color = conditionColor; |
| | | needLvText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | conditionText.color = conditionRedColor; |
| | | needLvText.color = conditionRedColor; |
| | | } |
| | | |
| | | break; |
| | | case 1: |
| | | realmTitleText.gameObject.SetActive(true); |
| | | realmImg.gameObject.SetActive(true); |
| | | realmTitleText.text = Language.Get("RealmLimit1"); |
| | | RealmConfig realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(itemTipsModel.curAttrData.itemConfig.RealmLimit); |
| | | if (itemTipsModel.curAttrData.itemConfig.RealmLimit <= 0) |
| | | { |
| | | realmImg.SetSprite("NoRealm"); |
| | | } |
| | | else |
| | | { |
| | | if (realmConfig != null) |
| | | { |
| | | realmImg.SetSprite(realmConfig.Img); |
| | | } |
| | | } |
| | | |
| | | if (PlayerDatas.Instance.baseData.realmLevel >= itemTipsModel.curAttrData.itemConfig.RealmLimit) |
| | | { |
| | | realmTitleText.color = conditionColor; |
| | | } |
| | | else |
| | | { |
| | | realmTitleText.color = conditionRedColor; |
| | | } |
| | | break; |
| | | case 2: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | private void SetDateLimitUI(double time) |
| | | { |
| | | dateText.gameObject.SetActive(true); |