From cad87129e5ea2fd23cc195ed0444bd38f1117aa7 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 05 八月 2025 15:51:54 +0800
Subject: [PATCH] 79 【常规】背包 - 随机宝箱界面,自选宝箱界面,获得物品奖励界面

---
 Main/Config/ConfigParse.cs |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/Main/Config/ConfigParse.cs b/Main/Config/ConfigParse.cs
index 355e980..8e2f2f8 100644
--- a/Main/Config/ConfigParse.cs
+++ b/Main/Config/ConfigParse.cs
@@ -105,6 +105,8 @@
         return msg.Split('_');
     }
 
+    //涓�缁存暟缁勶細鏉ユ簮鏍煎紡濡� 1_2|2_3|3_1|4_3锛�
+    //杩斿洖涓�缁存暟缁勭粨鏋勫 1|2|3|4
     public static T[] GetKeyValueKeys<T>(string msg) where T : struct
     {
         string[] segs = GetMultipleStr(msg);
@@ -124,6 +126,8 @@
         return null;
     }
 
+    //涓�缁存暟缁勶細鏉ユ簮鏍煎紡濡� 1_2|2_3|3_1|4_3锛�
+    //杩斿洖涓�缁存暟缁勭粨鏋勫 2|3|1|3
     public static T[] GetKeyValueValues<T>(string msg) where T : struct
     {
         string[] segs = GetMultipleStr(msg);
@@ -143,6 +147,31 @@
         return null;
     }
 
+    //浜岀淮鏁扮粍锛氭潵婧愭牸寮忓 1_2_1|2_3_4|3_1_2|4_3_4
+    public static T[][] GetArray2<T>(string msg) where T : struct
+    {
+        string[] segs = GetMultipleStr(msg);
+        if (segs != null && segs.Length > 0)
+        {
+            T[][] array = new T[segs.Length][];
+            for (int i = 0; i < segs.Length; i++)
+            {
+                string[] pair = GetKeyValue(segs[i]);
+                if (pair.Length > 1)
+                {
+                    array[i] = new T[pair.Length];
+                    for (int j = 0; j < pair.Length; j++)
+                    {
+                        array[i][j] = (T)Convert.ChangeType(pair[j], typeof(T));
+                    }
+                }
+            }
+            return array;
+        }
+        return null;
+    }
+
+    //瀛楀吀锛氭潵婧愭牸寮忓 1_2|2_3|3_1|4_3锛�
     public static Dictionary<T, P> GetDic<T, P>(string msg)
     {
         Dictionary<T, P> dic = null;

--
Gitblit v1.8.0