| | |
| | | public partial class PresetUnlockConfig : ConfigBase<int, PresetUnlockConfig> |
| | | { |
| | | static Dictionary<int, Dictionary<int, PresetUnlockConfig>> m_PresetUnlockDict = new Dictionary<int, Dictionary<int, PresetUnlockConfig>>(); |
| | | |
| | | static Dictionary<int, int> m_UnLockTypeDict = new Dictionary<int, int>(); |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | if (!m_PresetUnlockDict.ContainsKey(PresetType)) |
| | |
| | | m_PresetUnlockDict[PresetType] = new Dictionary<int, PresetUnlockConfig>(); |
| | | } |
| | | m_PresetUnlockDict[PresetType][PresetID] = this; |
| | | |
| | | if (!m_UnLockTypeDict.ContainsKey(PresetType)) |
| | | { |
| | | m_UnLockTypeDict[PresetType] = UnlockType; |
| | | } |
| | | else if (m_UnLockTypeDict[PresetType] < UnlockType) |
| | | { |
| | | m_UnLockTypeDict[PresetType] = UnlockType; |
| | | } |
| | | } |
| | | |
| | | public static PresetUnlockConfig GetPresetUnlockConfig(int presetType, int presetID) |
| | |
| | | return null; |
| | | } |
| | | |
| | | public static int GetUnlockType(int presetType) |
| | | { |
| | | if (m_UnLockTypeDict.ContainsKey(presetType)) |
| | | { |
| | | return m_UnLockTypeDict[presetType]; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public static int GetFuncPresetMaxCount(int presetType) |
| | | { |
| | | if (m_PresetUnlockDict.ContainsKey(presetType)) |
| | | { |
| | | return m_PresetUnlockDict[presetType].Count; |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | } |