From d165af063d7365e143d92c3a950a0b52e683a66e Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 23 一月 2026 15:33:29 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/Config/PartialConfigs/PresetUnlockConfig.cs |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/Main/Config/PartialConfigs/PresetUnlockConfig.cs b/Main/Config/PartialConfigs/PresetUnlockConfig.cs
index 80208b7..f96c119 100644
--- a/Main/Config/PartialConfigs/PresetUnlockConfig.cs
+++ b/Main/Config/PartialConfigs/PresetUnlockConfig.cs
@@ -2,7 +2,7 @@
 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))
@@ -10,6 +10,15 @@
             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)
@@ -21,4 +30,22 @@
         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;
+    }
+
 }

--
Gitblit v1.8.0