From b30b110fc4e5901fde2cd4e4e6444bbd32980d86 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 29 一月 2026 14:25:04 +0800
Subject: [PATCH] 423 【内政】命格系统-服务端(命格装备增加A814回包,类型27;)

---
 PySysDB/生成IpyGameDataPY/IpyGameDataPYTemp.py |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py" "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py"
index 0a0bb50..93bb497 100644
--- "a/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py"
+++ "b/PySysDB/\347\224\237\346\210\220IpyGameDataPY/IpyGameDataPYTemp.py"
@@ -11,6 +11,8 @@
 #
 # 详细描述: 读取PY表
 #
+# @note: 本脚本由 \PySysDB\生成IpyGameDataPY 生成
+#
 #-------------------------------------------------------------------------------
 #"""Version = 2018-05-10 12:00"""
 #-------------------------------------------------------------------------------
@@ -106,10 +108,12 @@
     
     def __LoadFileData(self, tableName, onlyCheck=False):
         # @param onlyCheck: 是否仅检查格式,一般启动时用
-        curPath = "<%LoadStructPath%>" + "\\PySysDB\\tag" + tableName + ".txt"
+        curPath = "<%LoadStructPath%>" + "\\PySysDB\\" + tableName + ".txt"
         if not os.path.isfile(curPath):
-            ErrLog("can not find file = %s,%s" % (tableName, curPath))
-            raise Exception("can not find file = %s,%s" % (tableName, curPath))
+            curPath = "<%LoadStructPath%>" + "\\PySysDB\\tag" + tableName + ".txt"
+            if not os.path.isfile(curPath):
+                ErrLog("can not find file = %s,%s" % (tableName, curPath))
+                raise Exception("can not find file = %s,%s" % (tableName, curPath))
         
         if not onlyCheck:
             if not hasattr(self, "ipy%sLen" % tableName):
@@ -287,19 +291,26 @@
     
     def __StrToList(self, strValue):
         setList = []
-        if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
+        if ChConfig.Def_Str_Montant in strValue: # |分割的优先
+            for value in strValue.split(ChConfig.Def_Str_Montant):
+                if value.isdigit():
+                    value = int(value)
+                elif (value.startswith("[") and value.endswith("]")) or (value.startswith("(") and value.endswith(")")):
+                    value = eval(value)
+                else:
+                    try:
+                        value = float(value)
+                    except:
+                        pass
+                setList.append(value)
+            if setList:
+                setList = tuple(setList)
+        elif (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")):
             setList = eval(strValue)
         elif strValue in ["0", "-", ""]:
             pass
         elif strValue.isdigit():
             setList = (int(strValue),)
-        else:
-            for value in strValue.split(ChConfig.Def_Str_Montant):
-                if value.isdigit():
-                    value = int(value)
-                setList.append(value)
-            if setList:
-                setList = tuple(setList)
         return setList
     
 #<%Ipy_Cache_Func%>

--
Gitblit v1.8.0