| | |
| | | // 国家 数量 |
| | | private static Dictionary<int, Dictionary<int, HeroLineupHaloConfig>> configDics = new Dictionary<int, Dictionary<int, HeroLineupHaloConfig>>(); |
| | | |
| | | // 混搭阵型索引:Key=Countrys, Value={NeedHeroCount→Config} |
| | | private static Dictionary<int, Dictionary<int, HeroLineupHaloConfig>> mixedConfigDics = new Dictionary<int, Dictionary<int, HeroLineupHaloConfig>>(); |
| | | |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | |
| | | Dictionary<int, HeroLineupHaloConfig> tempDic = null; |
| | | if (!configDics.TryGetValue(Country, out tempDic)) |
| | | if (Country == 0 && Countrys > 0) |
| | | { |
| | | tempDic = new Dictionary<int, HeroLineupHaloConfig>(); |
| | | configDics.Add(Country, tempDic); |
| | | // 混搭阵型配置 |
| | | Dictionary<int, HeroLineupHaloConfig> tempDic = null; |
| | | if (!mixedConfigDics.TryGetValue(Countrys, out tempDic)) |
| | | { |
| | | tempDic = new Dictionary<int, HeroLineupHaloConfig>(); |
| | | mixedConfigDics.Add(Countrys, tempDic); |
| | | } |
| | | tempDic[NeedHeroCount] = this; |
| | | } |
| | | else |
| | | { |
| | | // 单国家配置 |
| | | Dictionary<int, HeroLineupHaloConfig> tempDic = null; |
| | | if (!configDics.TryGetValue(Country, out tempDic)) |
| | | { |
| | | tempDic = new Dictionary<int, HeroLineupHaloConfig>(); |
| | | configDics.Add(Country, tempDic); |
| | | } |
| | | |
| | | tempDic[NeedHeroCount] = this; |
| | | tempDic[NeedHeroCount] = this; |
| | | } |
| | | } |
| | | |
| | | public static HeroLineupHaloConfig GetConfig(int country, int count) |
| | |
| | | return configDics[country][count]; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有混搭配置 |
| | | /// </summary> |
| | | public static Dictionary<int, Dictionary<int, HeroLineupHaloConfig>> GetAllMixedConfigs() |
| | | { |
| | | return mixedConfigDics; |
| | | } |
| | | |
| | | public static Dictionary<int, HeroLineupHaloConfig> GetAttrsByCountry(int country) |
| | | { |
| | | Dictionary<int, HeroLineupHaloConfig> attrs; |