PySysDB/Éú³ÉIpyGameDataPY/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,7 +291,7 @@
    
    def __StrToList(self, strValue):
        setList = []
        if ("[" in strValue and "]" in strValue) or ("(" in strValue and ")" in strValue):
        if (strValue.startswith("[") and strValue.endswith("]")) or (strValue.startswith("(") and strValue.endswith(")")):
            setList = eval(strValue)
        elif strValue in ["0", "-", ""]:
            pass
@@ -297,6 +301,13 @@
            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)