| | |
| | | public partial class RealmLVUPTaskConfig : ConfigBase<int, RealmLVUPTaskConfig> |
| | | { |
| | | //官职:任务ID:索引id |
| | | private static Dictionary<int, Dictionary<int, int>> missionDict = new Dictionary<int, Dictionary<int, int>>(); |
| | | private static Dictionary<int, Dictionary<int, RealmLVUPTaskConfig>> missionDict = new Dictionary<int, Dictionary<int, RealmLVUPTaskConfig>>(); |
| | | |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | if (!missionDict.ContainsKey(Lv)) |
| | | { |
| | | missionDict.Add(Lv, new Dictionary<int, int>()); |
| | | missionDict.Add(Lv, new Dictionary<int, RealmLVUPTaskConfig>()); |
| | | } |
| | | missionDict[Lv][TaskID] = ID; |
| | | missionDict[Lv][TaskID] = this; |
| | | } |
| | | |
| | | public static int GetID(int realmLV, int taskID) |
| | | public static RealmLVUPTaskConfig GetID(int realmLV, int taskID) |
| | | { |
| | | if (missionDict.ContainsKey(realmLV) && missionDict[realmLV].ContainsKey(taskID)) |
| | | { |
| | | return missionDict[realmLV][taskID]; |
| | | } |
| | | return -1; |
| | | return null; |
| | | } |
| | | |
| | | public static List<int> GetMissionIDs(int lv) |