| | |
| | | endlessPortList = JsonDataCenter.GetList<endless_port>(); |
| | | portConfigList = new List<EndlessPortConfig>(); |
| | | portDic = new Dictionary<int, List<EndlessPortConfig>>(); |
| | | InitPortList(portConfigList, endlessPortList); |
| | | } |
| | | |
| | | private static void InitPortList(List<EndlessPortConfig> list, List<endless_port> srcList) |
| | | /// <summary> |
| | | /// 更新关卡数据的时候也重新初始化一次 |
| | | /// </summary> |
| | | public static void InitPortList() |
| | | { |
| | | maxLevel = 0; |
| | | int? preLevel = null; |
| | | portConfigList.Clear(); |
| | | portDic.Clear(); |
| | | |
| | | foreach (endless_port data in srcList) |
| | | foreach (endless_port data in endlessPortList) |
| | | { |
| | | if (!GameConfig.IsNewbie && data.level < 0) continue; |
| | | |
| | |
| | | } |
| | | |
| | | param.DropTotalWeight = totalWeight; |
| | | list.Add(param); |
| | | |
| | | portConfigList.Add(param); |
| | | |
| | | if (!portDic.ContainsKey(param.PortLevel)) |
| | | portDic.Add(param.PortLevel, new List<EndlessPortConfig>()); |
| | | |
| | | |
| | | portDic[param.PortLevel].Add(param); |
| | | } |
| | | } |