| System/KnapSack/Logic/PlayerPackModels.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/PlayerStarNumWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/KnapSack/Logic/PlayerPackModels.cs
@@ -550,6 +550,47 @@ equipAttrActiveDict.TryGetValue(type,out cnt); return cnt; } public List<int> GetAddAttrIdByStars(out int starsCount) { starsCount = 0; List<int> activeIdlist = new List<int>(); List<int> addIdlist = new List<int>(); int activeStars = GetActiveCntByType(1); RoleEquipStarsConfig activeStarsConfig = RoleEquipStarsConfig.GetEquipStarsModel(activeStars); if(activeStarsConfig != null) { for(int i = 0; i < activeStarsConfig.attType.Length; i++) { activeIdlist.Add(activeStarsConfig.attType[i]); } } List<RoleEquipStarsConfig> starsConfigs = Config.Instance.GetAllValues<RoleEquipStarsConfig>(); for (int i = 0; i < starsConfigs.Count; i++) { bool isAddId = false; RoleEquipStarsConfig starsConfig = starsConfigs[i]; if (activeStars < starsConfig.countNeed) { for(int j = 0; j < starsConfig.attType.Length; j++) { int attrId = starsConfig.attType[j]; if (!activeIdlist.Contains(attrId)) { isAddId = true; addIdlist.Add(attrId); } } } if(isAddId) { starsCount = starsConfig.countNeed; break; } } return addIdlist; } #endregion #endregion System/KnapSack/Logic/PlayerStarNumWin.cs
@@ -23,6 +23,7 @@ [SerializeField] Button activityBtn; [SerializeField] Text activeBtnText; [SerializeField] UIEffect successEffect; [SerializeField] Text addAttrText; private int _curStarsCount; private PlayerPropertyConfig _playerProModel; @@ -155,6 +156,27 @@ nextNoActObj.SetActive(true); RefreshActiveBtnUI(false); } int addAttrStarsNum = 0; List<int> addIdlist = playerPack.GetAddAttrIdByStars(out addAttrStarsNum); if(addIdlist.Count > 0) { addAttrText.gameObject.SetActive(true); string addAttr = ""; for(int i = 0; i < addIdlist.Count; i++) { PlayerPropertyConfig propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(addIdlist[i]); if(propertyConfig != null) { addAttr = StringUtility.Contact(addAttr, propertyConfig.Name); } } addAttrText.text = Language.Get("KnapS148",addAttrStarsNum,addAttr); } else { addAttrText.gameObject.SetActive(false); } } private void RefreshActiveBtnUI(bool isActive)