hch
2025-09-09 7ee06a9d53a47b106458c571fadbb7583b570766
Main/System/HeroUI/HeroUIManager.Awake.cs
@@ -12,5 +12,31 @@
    public List<int> heroBeforeAwakeGiftIDList = new List<int>();    //会有重复的ID,不要用字典
    public List<int> heroBeforeAwakeGiftLevelList = new List<int>();
    //达到X星需要的觉醒等级
    public int GetAwakeLVByStarLV(int heroID, int starLV)
    {
        var config = HeroConfig.Get(heroID);
        var starCnt = HeroQualityConfig.Get(config.Quality).InitStarUpper;
        if (starLV <= starCnt)
            return 0;
        Dictionary<int, HeroAwakeConfig> tempDic = null;
        if (!HeroAwakeConfig.configDics.TryGetValue(heroID, out tempDic))
        {
            return 0;
        }
        foreach (var item in tempDic)
        {
            starCnt += item.Value.AddStarUpper;
            if (starCnt >= starLV)
            {
                return item.Key;
            }
        }
        return 0;
    }
}