From 53ce447affac8557a2c0570875d41f45590372d4 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 10 九月 2025 15:46:26 +0800
Subject: [PATCH] 117 【武将】武将系统 - 满级预览
---
Main/System/HeroUI/HeroCollectionCardCell.cs | 5
Main/System/HeroUI/HeroBestWin.cs.meta | 11 +
Main/System/HeroUI/HeroBestWin.cs | 480 +++++++++++++++++++++++++++++++++++++++++++++++++++++
Main/System/HeroUI/HeroTrainWin.cs | 2
Main/System/HeroUI/HeroUIManager.Collect.cs | 13 +
Main/System/HeroUI/HeroUIManager.cs | 13 +
6 files changed, 520 insertions(+), 4 deletions(-)
diff --git a/Main/System/HeroUI/HeroBestWin.cs b/Main/System/HeroUI/HeroBestWin.cs
new file mode 100644
index 0000000..dcef983
--- /dev/null
+++ b/Main/System/HeroUI/HeroBestWin.cs
@@ -0,0 +1,480 @@
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+/// <summary>
+/// 姝﹀皢婊$骇棰勮鐣岄潰
+/// </summary>
+public class HeroBestWin : UIBase
+{
+ [SerializeField] RawImage bgTexture;
+ [SerializeField] Button showFuncBtn; //鍙樉绀虹珛缁樻椂鐐瑰嚮锛屾樉绀哄姛鑳�
+ [SerializeField] Transform funcForm;
+ [SerializeField] UIHeroController roleLhModel; //灞曠ず鑻遍泟绔嬬粯
+ [SerializeField] Button rightBtn;
+ [SerializeField] Button leftBtn;
+ [SerializeField] UIHeroController roleXsModel; //鍍忕礌
+ [SerializeField] Image jobImg;
+ [SerializeField] Text jobPosNameText;
+ [SerializeField] Text descText;
+ [SerializeField] HeroConnectionCell connetionForm; //缇佺粖
+ [SerializeField] Button seeLhBtn; //鏌ョ湅绔嬬粯
+ [SerializeField] SkillBaseCell normalSkillCell;
+ [SerializeField] SkillBaseCell angerSkillCell;
+
+ [SerializeField] Button closeBtn; //鍏抽棴鎸夐挳
+ [SerializeField] Button starBtn; //鏄剧ず鏄熺骇鏂囧瓧
+ [SerializeField] List<Image> starImgList;
+ [SerializeField] Text nameText;
+ [SerializeField] UIEffectPlayer nameEffect;
+ [SerializeField] Image countryImg;
+ [SerializeField] Text awakeLVText;
+
+ //灞炴�у尯
+ [SerializeField] ScrollRect allAttrScroll;
+ [SerializeField] Button attrBtn;
+ [SerializeField] Image unfoldImg; //灞曞紑鏃舵寜閽殑鍥炬爣
+ [SerializeField] Image foldImg; //鏀惰捣鏃舵寜閽殑鍥炬爣
+ bool unfoldState = false;//鏄惁灞曞紑
+ [SerializeField] Transform foldPos;
+ [SerializeField] Transform unfoldPos; //灞曞紑鏃剁殑浣嶇疆
+ [SerializeField] RectTransform attrPanel; //鏄剧ず鐨勫睘鎬ф爮
+ [SerializeField] RichText inheritText; //姝﹀皢缁ф壙鎻忚堪
+ [SerializeField] Text[] inheritAttrText; //姝﹀皢浼氱户鎵跨殑灞炴��
+ [SerializeField] RichText heroAddPerText; //涓诲叕锛堜笂闃碉級鍔犳垚鎻忚堪
+ [SerializeField] Text[] heroAddAttrPerText; //涓诲叕锛堜笂闃碉級鍔犳垚
+
+ [SerializeField] GameObject potentialCell; //娼滆兘鍜岃閱掔敤浜庡垱寤�
+ [SerializeField] Transform potentialCellParent; //娼滆兘鐖惰妭鐐�
+ List<GameObject> potentialCellList; //娼滆兘
+ [SerializeField] Transform awakeCellParent; //娼滆兘鐖惰妭鐐�
+ [SerializeField] GameObject awakeGo;
+ List<GameObject> awakeCellList; //瑙夐啋
+
+ [SerializeField] GameObject fetterGo;
+ [SerializeField] Text[] fetterText; //缇佺粖
+ [SerializeField] Text[] fetterNameText; //缇佺粖
+
+
+ //澶╄祴
+ [SerializeField] GiftBaseCell[] giftBaseCells;
+
+ HeroConfig heroConfig;
+ int heroLevel;
+ int heroStar;
+ int breakLevel;
+ int awakeLevel;
+ protected override void InitComponent()
+ {
+ showFuncBtn.AddListener(() =>
+ {
+ funcForm.SetActive(true);
+ });
+ seeLhBtn.AddListener(() =>
+ {
+ funcForm.SetActive(false);
+ });
+ closeBtn.AddListener(CloseWindow);
+ rightBtn.AddListener(() =>
+ {
+ ChangeHero(1);
+ });
+ leftBtn.AddListener(() =>
+ {
+ ChangeHero(-1);
+ });
+
+
+ inheritText.OnClick = () =>
+ {
+ SmallTipWin.showText = Language.Get("herocard47");
+ SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+ UIManager.Instance.OpenWindow<SmallTipWin>();
+ };
+ heroAddPerText.OnClick = () =>
+ {
+ SmallTipWin.showText = Language.Get("herocard48");
+ SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+ UIManager.Instance.OpenWindow<SmallTipWin>();
+ };
+ attrBtn.AddListener(() =>
+ {
+ unfoldState = !unfoldState;
+ RefreshFoldState();
+ });
+
+
+ starBtn.AddListener(() =>
+ {
+ var config = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
+ SmallTipWin.showText = Language.Get("HeroGift14",
+ HeroUIManager.Instance.GetMaxStarCount(HeroUIManager.Instance.selectForPreviewHeroID, config.Quality));
+ SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition);
+ UIManager.Instance.OpenWindow<SmallTipWin>();
+ });
+
+ potentialCellList = new List<GameObject>();
+ awakeCellList = new List<GameObject>();
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ unfoldState = false;
+ allAttrScroll.verticalNormalizedPosition = 1;
+ Display();
+ }
+
+
+
+ public void Display()
+ {
+ heroConfig = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
+ bgTexture.SetTexture2D("countryBG" + heroConfig.Country);
+ int skinID = heroConfig.SkinIDList[0];
+ roleLhModel.Create(skinID, 1, motionName: "", isLh: true);
+ roleXsModel.Create(skinID);
+ jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class));
+ jobPosNameText.text = HeroUIManager.Instance.GetJobName(heroConfig.Class);
+ descText.text = heroConfig.Desc;
+
+
+ RefreshConn();
+ normalSkillCell.Init(heroConfig.AtkSkillID, () =>
+ {
+ UIManager.Instance.OpenWindow<HeroSkillWin>(HeroUIManager.Instance.selectForPreviewHeroID);
+ }, true);
+ angerSkillCell.Init(heroConfig.AngerSkillID, () =>
+ {
+ UIManager.Instance.OpenWindow<HeroSkillWin>(HeroUIManager.Instance.selectForPreviewHeroID);
+ }, true);
+
+
+ RefreshName();
+ RefreshFoldState();
+ RefreshAttr();
+ RefreshAllPotential();
+ RefreshFetter();
+ RefreshGift();
+ RefreshAwake();
+ }
+
+
+
+ void RefreshConn()
+ {
+ if (heroConfig.FetterIDList.Length > 0)
+ {
+ connetionForm.SetActive(true);
+ connetionForm.Display(heroConfig.FetterIDList[0], Language.Get("herocard38") + "\n", true);
+ }
+ else
+ {
+ connetionForm.SetActive(false);
+ }
+
+ }
+
+ void ChangeHero(int changeValue)
+ {
+ var index = HeroUIManager.Instance.heroCollectList.IndexOf(HeroUIManager.Instance.selectForPreviewHeroID);
+ if (index == -1)
+ return;
+ allAttrScroll.verticalNormalizedPosition = 1;
+ int resultIndex = index + changeValue;
+ //寰幆澶勭悊
+ if (resultIndex < 0)
+ {
+ resultIndex = HeroUIManager.Instance.heroCollectList.Count - 1;
+ }
+ else if (resultIndex > HeroUIManager.Instance.heroCollectList.Count - 1)
+ {
+ resultIndex = 0;
+ }
+ HeroUIManager.Instance.selectForPreviewHeroID = HeroUIManager.Instance.heroCollectList[resultIndex];
+ Display();
+ }
+
+
+
+ void RefreshStars()
+ {
+ heroStar = HeroUIManager.Instance.GetMaxStarCount(HeroUIManager.Instance.selectForPreviewHeroID, heroConfig.Quality);
+ for (int i = 0; i < starImgList.Count; i++)
+ {
+ if ((heroStar - 1) % starImgList.Count >= i)
+ {
+ starImgList[i].SetActive(true);
+ starImgList[i].SetSprite("herostar" + (((heroStar - 1) / starImgList.Count) + 1) * starImgList.Count);
+ }
+ else
+ {
+ starImgList[i].SetActive(false);
+ }
+ }
+ }
+
+ void RefreshName()
+ {
+ RefreshStars();
+ breakLevel = HeroBreakConfig.GetMaxBreakLv(HeroUIManager.Instance.selectForPreviewHeroID);
+ nameText.text = breakLevel == 0 ? heroConfig.Name : Language.Get("herocardbreaklv", heroConfig.Name, breakLevel);
+
+ nameText.color = UIHelper.GetUIColorByFunc(heroConfig.Quality);
+
+ if (heroConfig.Quality >= 4)
+ {
+ nameEffect.SetActive(true);
+ nameEffect.Play(heroConfig.Quality == 4 ? 0 : 1);
+ }
+ else
+ {
+ nameEffect.SetActive(false);
+ }
+ countryImg.SetSprite(HeroUIManager.Instance.GetCountryIconName(heroConfig.Country));
+ awakeLevel = HeroAwakeConfig.GetMaxAwakeLV(HeroUIManager.Instance.selectForPreviewHeroID);
+ heroLevel = HeroUIManager.Instance.GetMaxLVByBreakLV(heroConfig.Quality, breakLevel);
+ if (awakeLevel == 0)
+ {
+ awakeLVText.text = Language.Get("L1094") + heroLevel;
+ awakeLVText.GetComponent<OutlineEx>().colorType = QualityTextColType.itemcucao;
+ }
+ else
+ {
+ awakeLVText.text = Language.Get("L1094") + heroLevel + " " + Language.Get("herocard12", awakeLevel);
+ awakeLVText.GetComponent<OutlineEx>().colorType = QualityTextColType.red;
+ }
+ }
+
+ void RefreshFoldState()
+ {
+ if (!unfoldState)
+ {
+ foldImg.SetActive(true);
+ unfoldImg.SetActive(false);
+ attrPanel.localPosition = foldPos.localPosition;
+ //绂佹attrScroll婊氬姩
+ allAttrScroll.enabled = false;
+
+ }
+ else
+ {
+ foldImg.SetActive(false);
+ unfoldImg.SetActive(true);
+ attrPanel.localPosition = unfoldPos.localPosition;
+ allAttrScroll.enabled = true;
+ }
+ }
+
+ public int GetOnBattleAddPer()
+ {
+ var qualityConfig = HeroQualityConfig.Get(heroConfig.Quality);
+ return qualityConfig.InitAddPer + qualityConfig.LVAddPer * (heroLevel - 1) + qualityConfig.BreakLVAddPer * breakLevel + qualityConfig.StarAddPer * heroStar;
+ }
+
+ void RefreshAttr()
+ {
+ inheritAttrText[0].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.inheritAttrs[0], heroConfig.AtkInheritPer));
+ inheritAttrText[1].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.inheritAttrs[1], heroConfig.DefInheritPer));
+ inheritAttrText[2].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.inheritAttrs[2], heroConfig.HPInheritPer));
+
+ //涓婇樀灞炴��
+ int valuePer = GetOnBattleAddPer();
+ for (int i = 0; i < heroAddAttrPerText.Length; i++)
+ {
+ heroAddAttrPerText[i].text = PlayerPropertyConfig.GetFullDescription(new Int2(PlayerPropertyConfig.basePerAttrs[i], valuePer));
+ }
+
+
+ }
+
+
+
+ void RefreshAllPotential()
+ {
+ if (!HeroBreakConfig.configDics.ContainsKey(HeroUIManager.Instance.selectForPreviewHeroID))
+ return;
+
+ var list = HeroBreakConfig.configDics[HeroUIManager.Instance.selectForPreviewHeroID].Keys.ToList();
+
+ list.Sort();
+
+ for (int i = 0; i < list.Count; i++)
+ {
+ var nextQualityBreakConfig = HeroBreakConfig.GetHeroBreakConfig(HeroUIManager.Instance.selectForPreviewHeroID, i + 1);
+ if (nextQualityBreakConfig == null)
+ break;
+ List<string> attrStrArr = new List<string>();
+ for (int j = 0; j < nextQualityBreakConfig.AttrIDList.Length; j++)
+ {
+ if (nextQualityBreakConfig.AttrIDList[j] == 0)
+ continue;
+ string format = i < breakLevel ? "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}") : "{0}+{1}";
+ attrStrArr.Add(PlayerPropertyConfig.GetFullDescription(nextQualityBreakConfig.AttrIDList[j], nextQualityBreakConfig.AttrValueList[j], format));
+ }
+
+ if (nextQualityBreakConfig.SkillID != 0)
+ {
+ var skill = SkillConfig.Get(nextQualityBreakConfig.SkillID);
+ if (skill != null)
+ {
+ attrStrArr.Add(Language.Get("equipQualityFormat", skill.SkillName) + skill.Description);
+ }
+ else
+ {
+ Debug.LogError("鏈厤缃妧鑳�" + nextQualityBreakConfig.SkillID);
+ }
+ }
+ if (i >= potentialCellList.Count)
+ {
+ potentialCellList.Add(Instantiate(potentialCell, potentialCellParent));
+ }
+ var go = potentialCellList[i];
+ var descText = go.GetComponent<Text>();
+ var nameText = go.GetComponent<Text>("skillname");
+ go.SetActive(true);
+ if (i < breakLevel)
+ {
+ nameText.text = Language.Get("herocard63", i + 1);
+ descText.text = string.Join(Language.Get("L1112"), attrStrArr);
+ }
+ else
+ {
+ //缃伆
+ nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard63", i + 1));
+ descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(string.Join(Language.Get("L1112"), attrStrArr)));
+ }
+ }
+
+ }
+
+ //缇佺粖
+ void RefreshFetter()
+ {
+ if (heroConfig.FetterIDList.Length == 0)
+ {
+ fetterGo.SetActive(false);
+ return;
+ }
+ fetterGo.SetActive(true);
+
+ for (int i = 0; i < fetterText.Length; i++)
+ {
+ if (i < heroConfig.FetterIDList.Length)
+ {
+ fetterText[i].SetActive(true);
+ var fetterID = heroConfig.FetterIDList[i];
+ HeroFetterConfig fetterConfig = HeroFetterConfig.Get(fetterID);
+ List<string> heroNames = new List<string>();
+ bool isAllCollect = true; //鏄惁鍏ㄦ敹闆�
+ foreach (var tmpHeroID in fetterConfig.HeroIDList)
+ {
+ heroNames.Add(HeroConfig.Get(tmpHeroID).Name);
+ if (HeroManager.Instance.GetHeroCountByID(tmpHeroID) == 0)
+ {
+ isAllCollect = false;
+ }
+ }
+ var attrStr = string.Join(Language.Get("SplitString1"), heroNames) + Language.Get("herocard38");
+
+ for (int j = 0; j < fetterConfig.AttrIDList.Length; j++)
+ {
+ string format = !isAllCollect ? "{0}+{1}" : "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}");
+ attrStr += Language.Get("L1112") + PlayerPropertyConfig.GetFullDescription(fetterConfig.AttrIDList[j], fetterConfig.AttrValueList[j], format);
+ }
+ fetterText[i].text = attrStr;
+ fetterText[i].color = UIHelper.GetUIColor(isAllCollect ? TextColType.NavyBrown : TextColType.NavyGray);
+ fetterNameText[i].text = fetterConfig.FetterName;
+ fetterNameText[i].color = UIHelper.GetUIColor(isAllCollect ? TextColType.NavyBrown : TextColType.NavyGray);
+
+ }
+ else
+ {
+ fetterText[i].SetActive(false);
+ }
+ }
+ }
+
+ void RefreshGift()
+ {
+ //鏈�寮烘樉绀�
+ for (int i = 0; i < giftBaseCells.Length; i++)
+ {
+ if (i < heroConfig.TalentList.Length)
+ {
+ giftBaseCells[i].SetActive(true);
+ giftBaseCells[i].Init(heroConfig.TalentList[i], HeroUIManager.Instance.maxGiftLevel);
+ }
+ else
+ {
+ giftBaseCells[i].SetActive(false);
+ }
+ }
+
+ }
+
+
+
+ void RefreshAwake()
+ {
+ if (!HeroAwakeConfig.CanAwake(HeroUIManager.Instance.selectForPreviewHeroID, 1))
+ {
+ awakeGo.SetActive(false);
+ return;
+ }
+ awakeGo.SetActive(true);
+
+ var maxLV = HeroAwakeConfig.GetMaxAwakeLV(HeroUIManager.Instance.selectForPreviewHeroID);
+ var starCnt = HeroQualityConfig.Get(heroConfig.Quality).InitStarUpper;
+ for (int i = 1; i <= maxLV; i++)
+ {
+ if (i > awakeCellList.Count)
+ {
+ awakeCellList.Add(Instantiate(potentialCell, awakeCellParent));
+ }
+ var go = awakeCellList[i - 1];
+ var descText = go.GetComponent<Text>();
+ var nameText = go.GetComponent<Text>("skillname");
+ go.SetActive(true);
+
+ var config = HeroAwakeConfig.GetHeroAwakeConfig(HeroUIManager.Instance.selectForPreviewHeroID, i);
+
+ int type = config.UnlockTalentSlot != 0 ? 1 : config.SkillID != 0 ? 2 : 3;
+ var awakeStr = string.Empty;
+ if (type == 1)
+ {
+ starCnt += config.AddStarUpper;
+ awakeStr = Language.Get("HeroAwake8", config.UnlockTalentSlot, starCnt);
+ }
+ else if (type == 2)
+ {
+ var skill = SkillConfig.Get(config.SkillID);
+ awakeStr = Language.Get("equipQualityFormat", skill.SkillName) + skill.Description;
+ }
+ else
+ {
+ for (int k = 0; k < config.AttrIDList.Length; k++)
+ {
+ awakeStr += PlayerPropertyConfig.GetFullDescription(config.AttrIDList[k], config.AttrValueList[k], "{0}+" + UIHelper.AppendColor(TextColType.Green, "{1}"))
+ + (k == config.AttrIDList.Length - 1 ? "" : "\n");
+ }
+ }
+
+ if (i - 1 < awakeLevel)
+ {
+ nameText.text = Language.Get("herocard12", i) + Language.Get("L1096");
+ descText.text = awakeStr;
+ }
+ else
+ {
+ //缃伆
+ nameText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get("herocard12", i) + Language.Get("L1096"));
+ descText.text = UIHelper.AppendColor(TextColType.NavyGray, UIHelper.RemoveColor(awakeStr));
+ }
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/Main/System/HeroUI/HeroBestWin.cs.meta b/Main/System/HeroUI/HeroBestWin.cs.meta
new file mode 100644
index 0000000..a135a6d
--- /dev/null
+++ b/Main/System/HeroUI/HeroBestWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e8eaaab6c9500944aafb7653793ed768
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/HeroUI/HeroCollectionCardCell.cs b/Main/System/HeroUI/HeroCollectionCardCell.cs
index c947636..2a66f7e 100644
--- a/Main/System/HeroUI/HeroCollectionCardCell.cs
+++ b/Main/System/HeroUI/HeroCollectionCardCell.cs
@@ -76,6 +76,11 @@
{
UIManager.Instance.OpenWindow<HeroCollectionLvUpWin>();
}
+ else
+ {
+ HeroUIManager.Instance.selectForPreviewHeroID = heroID;
+ UIManager.Instance.OpenWindow<HeroBestWin>();
+ }
});
bookLVBtn.AddListener(() =>
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index b0c53de..d361c38 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -221,7 +221,6 @@
PlayerMainDate.Instance.AddPowerNotOnTeam(hero);
lockImg.SetActive(hero.isLock);
unLockImg.SetActive(!hero.isLock);
- nameText.text = hero.breakLevel == 0 ? hero.heroConfig.Name : Language.Get("herocardbreaklv", hero.heroConfig.Name, hero.breakLevel);
RefreshConn();
normalSkillCell.Init(hero.heroConfig.AtkSkillID, () =>
@@ -334,6 +333,7 @@
{
RefreshStars();
nameText.text = hero.breakLevel == 0 ? hero.heroConfig.Name : Language.Get("herocardbreaklv", hero.heroConfig.Name, hero.breakLevel);
+
nameText.color = UIHelper.GetUIColorByFunc(hero.Quality);
if (hero.Quality >= 4)
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index 884f986..c51be67 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -11,13 +11,15 @@
public Dictionary<int, List<int>> heroCollectDict { get; private set; } = new Dictionary<int, List<int>>(); //姝﹀皢鍥鹃壌鎸夊搧璐ㄥ垪琛�
+ public List<int> heroCollectList = new List<int>(); //姝﹀皢鍥鹃壌鍒楄〃
public int selectHeroCollectListJob = 0; //姝﹀皢鍒楄〃鐣岄潰 绛涢�夎亴涓�
public int selectHeroCollectListCountry = 0; //姝﹀皢鍒楄〃鐣岄潰绛涢�夊浗瀹�
- public int selectCollectHeroID; //閫変腑鐨勬灏唅d
+ public int selectCollectHeroID; //閫変腑鐨勬灏唅d 鐢ㄤ簬鍗囩骇
public int bookMoneyType; //鍥鹃壌濂栧姳璐у竵绫诲瀷
public int bookMoneyValue;//鍥鹃壌濂栧姳璐у竵鏁伴噺
+ public int selectForPreviewHeroID; //閫変腑鐨勬灏唅d 鐢ㄤ簬棰勮
//鍥鹃壌鍜岀毊鑲ょ殑婵�娲绘儏鍐�
Dictionary<int, HB122_tagSCHeroInfo.tagSCHero> heroCollectInfoDic = new Dictionary<int, HB122_tagSCHeroInfo.tagSCHero>();
@@ -87,6 +89,15 @@
heroCollectDict[heroConfig.Quality].Add(heroID);
}
+
+ heroCollectList.Clear();
+ //鎸夊搧璐ㄥ�掑簭鍔犲叆
+ var _list = heroCollectDict.Keys.ToList();
+ _list.Reverse();
+ foreach (var quality in _list)
+ {
+ heroCollectList.AddRange(heroCollectDict[quality]);
+ }
}
//鍥鹃壌鎬讳笂闄愮瓑绾� = 鍥鹃壌鏄熺骇涓婇檺 + 鍥鹃壌绐佺牬涓婇檺
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 679d42d..aa04270 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -142,10 +142,19 @@
return hero.heroLevel >= GetMaxLV(hero.Quality);
}
- //绐佺牬闄愬埗鐨勬渶楂樼瓑绾�
+ //绐佺牬闄愬埗鐨勬渶楂樼瓑绾�; 瀛樺湪绐佺牬绛夌骇鍙兘鏇村鐨勬儏鍐碉紝涓嶄竴瀹氭彁渚涚瓑绾т笂闄�
public int GetMaxLVByBreakLV(int quality, int breakLevel)
{
- return HeroQualityBreakConfig.GetQualityBreakConfig(quality, breakLevel).LVMax;
+ for (int i = breakLevel; i >= 0; i--)
+ {
+ var config = HeroQualityBreakConfig.GetQualityBreakConfig(quality, i);
+ if (config == null)
+ {
+ continue;
+ }
+ return config.LVMax;
+ }
+ return 0;
}
public bool IsLVMaxByBreakLevel(HeroInfo hero)
--
Gitblit v1.8.0