using System; using System.Collections; using System.Collections.Generic; using UnityEngine; //觉醒 public partial class HeroUIManager : GameSystemManager { public string selectAwakeHeroGuid; public List heroBeforeAwakeGiftIDList = new List(); //会有重复的ID,不要用字典 public List heroBeforeAwakeGiftLevelList = new List(); //达到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 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; } }