| | |
| | | { |
| | | private static Dictionary<int, List<int>> resultDict = new Dictionary<int, List<int>>(); |
| | | private static Dictionary<int, List<int>> resultWishIDDict = new Dictionary<int, List<int>>(); |
| | | protected override void OnConfigParseCompleted() |
| | | private static Dictionary<int, Dictionary<int, int>> infoDict = new Dictionary<int, Dictionary<int, int>>(); |
| | | |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | if (!resultDict.ContainsKey(LibID)) |
| | | { |
| | |
| | | { |
| | | resultWishIDDict[LibID].Add(ID); |
| | | } |
| | | |
| | | if (!infoDict.ContainsKey(LibID)) |
| | | { |
| | | infoDict[LibID] = new Dictionary<int, int>(); |
| | | } |
| | | infoDict[LibID][ItemID] = ID; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | return resultWishIDDict[libID]; |
| | | } |
| | | |
| | | public static bool TryGetID(int libID, int itemID, out int id) |
| | | { |
| | | id = 0; |
| | | return infoDict.TryGetValue(libID, out var dict) && dict.TryGetValue(itemID, out id); |
| | | } |
| | | } |