| using System.Collections.Generic; | 
| using UnityEngine; | 
|   | 
| public partial class HeroBreakConfig : ConfigBase<int, HeroBreakConfig> | 
| { | 
|     // public int HeroID; | 
|     // public int BreakLV; | 
|   | 
|     // HeroID, Dictionary<BreakLV, HeroBreakConfig> | 
|     public static Dictionary<int, Dictionary<int, HeroBreakConfig>> configDics = new Dictionary<int, Dictionary<int, HeroBreakConfig>>(); | 
|   | 
|     protected override void OnConfigParseCompleted() | 
|     { | 
|         base.OnConfigParseCompleted(); | 
|   | 
|         Dictionary<int, HeroBreakConfig> tempDic = null; | 
|         if (!configDics.TryGetValue(HeroID, out tempDic)) | 
|         { | 
|             tempDic = new Dictionary<int, HeroBreakConfig>(); | 
|             configDics.Add(HeroID, tempDic); | 
|         } | 
|   | 
|         if (tempDic.ContainsKey(BreakLV)) | 
|         { | 
|             tempDic[BreakLV] = this; | 
|         } | 
|         else | 
|         { | 
|             tempDic.Add(BreakLV, this); | 
|         } | 
|     } | 
|   | 
|     public static HeroBreakConfig GetHeroBreakConfig(int heroID, int breakLv) | 
|     { | 
|         Dictionary<int, HeroBreakConfig> tempDic = null; | 
|         if (!configDics.TryGetValue(heroID, out tempDic)) | 
|         { | 
|             return null; | 
|         } | 
|         HeroBreakConfig config = null; | 
|         tempDic.TryGetValue(breakLv, out config); | 
|         return config; | 
|     } | 
|   | 
|     public static bool IsReachMax(int heroID, int breakLv) | 
|     { | 
|         return GetHeroBreakConfig(heroID, breakLv) == null; | 
|     } | 
| } |