| Main/System/Hero/HeroManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroDeleteWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/HeroUI/HeroTrainWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/System/Hero/HeroManager.cs
@@ -73,6 +73,11 @@ public HeroInfo GetHero(string guid) { if (heroInfoDict == null || guid == null) { Debug.LogError("HeroManager GetHero guid is null"); return null; } if (!heroInfoDict.ContainsKey(guid)) return null; return heroInfoDict[guid]; @@ -227,4 +232,17 @@ return null; } public List<HeroInfo> GetHeroListByID(int heroID) { List<HeroInfo> heroList = new List<HeroInfo>(); foreach (HeroInfo heroInfo in heroInfoDict.Values) { if (heroInfo.heroId == heroID) { heroList.Add(heroInfo); } } return heroList; } } Main/System/HeroUI/HeroDeleteWin.cs
@@ -42,7 +42,10 @@ fiterManager.Display(0, SelectJobCountry); //外部选中 HeroUIManager.Instance.SelectDeleteHero(HeroManager.Instance.GetHero(HeroUIManager.Instance.jumpDeleteHeroGuid)); if (!string.IsNullOrEmpty(HeroUIManager.Instance.jumpDeleteHeroGuid)) { HeroUIManager.Instance.SelectDeleteHero(HeroManager.Instance.GetHero(HeroUIManager.Instance.jumpDeleteHeroGuid)); } RefreshEmptyTip(); // CreateScroller(); @@ -93,7 +96,6 @@ { noHeroObj.SetActive(true); scroller.SetActive(false); HeroUIManager.Instance.selectDeleteHeroList.Clear(); } else { @@ -251,6 +253,10 @@ int FindJumpIndexByHero(string guid) { if (string.IsNullOrEmpty(guid)) { return 0; } var hero = HeroManager.Instance.GetHero(guid); if (hero == null) return -1; Main/System/HeroUI/HeroTrainWin.cs
@@ -393,10 +393,41 @@ // SysNotifyMgr.Instance.ShowTip("UnlockHero"); // return; // } HeroUIManager.Instance.jumpDeleteHeroGuid = guid; if (CanDelete()) { HeroUIManager.Instance.jumpDeleteHeroGuid = guid; } else { HeroUIManager.Instance.jumpDeleteHeroGuid = ""; } UIManager.Instance.OpenWindow<HeroDeleteWin>(); } bool CanDelete() { if (hero.isAttrActive) return false; bool isFullStar = false; var _list = HeroManager.Instance.GetHeroListByID(hero.heroId); foreach (var heroInfo in _list) { if (heroInfo.heroStar < heroInfo.GetCurMaxStar()) { continue; } //相同武将中已经有满星的 isFullStar = true; break; } return isFullStar; } void RefreshStars() { for (int i = 0; i < starImgList.Count; i++)