Fix: 修复服务器启动报错;
读功能配置表错误增加详细错误日志输出;
3个文件已修改
82 ■■■■ 已修改文件
PySysDB/生成IpyGameDataPY/IpyGameDataPYTemp.py 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/Éú³ÉIpyGameDataPY/IpyGameDataPYTemp.py
@@ -153,22 +153,26 @@
        for i, strValue in enumerate(rowList):
            if i == 0:
                continue
            fieldName = fieldList[i][1]
            strValue = strValue.lstrip().rstrip()
            if strValue.isdigit():
                configValue = int(strValue)
            elif (strValue.startswith("{") and strValue.endswith("}")) \
                or (strValue.startswith("[") and strValue.endswith("]")) \
                or (strValue.startswith("(") and strValue.endswith(")")):
                configValue = eval(strValue)
            elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                configValue = self.__StrToDict(strValue)
            elif ChConfig.Def_Str_Montant in strValue:
                configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
            elif strValue in ["-", ""]:
                configValue = ""
            else:
                configValue = self.__ToFloat(strValue)
            try:
                fieldName = fieldList[i][1]
                strValue = strValue.lstrip().rstrip()
                if strValue.isdigit():
                    configValue = int(strValue)
                elif (strValue.startswith("{") and strValue.endswith("}")) \
                    or (strValue.startswith("[") and strValue.endswith("]")) \
                    or (strValue.startswith("(") and strValue.endswith(")")):
                    configValue = eval(strValue)
                elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                    configValue = self.__StrToDict(strValue)
                elif ChConfig.Def_Str_Montant in strValue:
                    configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
                elif strValue in ["-", ""]:
                    configValue = ""
                else:
                    configValue = self.__ToFloat(strValue)
            except BaseException:
                ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
                raise
            setattr(funcConfigObj, fieldName, configValue)
        self.ipyFuncConfigDict[key] = funcConfigObj
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -3212,22 +3212,26 @@
        for i, strValue in enumerate(rowList):
            if i == 0:
                continue
            fieldName = fieldList[i][1]
            strValue = strValue.lstrip().rstrip()
            if strValue.isdigit():
                configValue = int(strValue)
            elif (strValue.startswith("{") and strValue.endswith("}")) \
                or (strValue.startswith("[") and strValue.endswith("]")) \
                or (strValue.startswith("(") and strValue.endswith(")")):
                configValue = eval(strValue)
            elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                configValue = self.__StrToDict(strValue)
            elif ChConfig.Def_Str_Montant in strValue:
                configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
            elif strValue in ["-", ""]:
                configValue = ""
            else:
                configValue = self.__ToFloat(strValue)
            try:
                fieldName = fieldList[i][1]
                strValue = strValue.lstrip().rstrip()
                if strValue.isdigit():
                    configValue = int(strValue)
                elif (strValue.startswith("{") and strValue.endswith("}")) \
                    or (strValue.startswith("[") and strValue.endswith("]")) \
                    or (strValue.startswith("(") and strValue.endswith(")")):
                    configValue = eval(strValue)
                elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
                    configValue = self.__StrToDict(strValue)
                elif ChConfig.Def_Str_Montant in strValue:
                    configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
                elif strValue in ["-", ""]:
                    configValue = ""
                else:
                    configValue = self.__ToFloat(strValue)
            except BaseException:
                ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
                raise
            setattr(funcConfigObj, fieldName, configValue)
        self.ipyFuncConfigDict[key] = funcConfigObj
        return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/ChNPC.py
@@ -140,15 +140,15 @@
    gameWorldIndex = GameWorld.GetGameWorld().GetCurGameWorldIndex()
    GameWorld.Log("NPC Initing...FB %d" % gameWorldIndex)
    mapID = GameWorld.GetMap().GetMapID()
    hideNPCIDList = [] # éœ€è¦éšè—çš„NPCID列表
    # ç”±äºŽæŸäº›å¸¸è§„线boss区域要重复利用,所以活动线独立,不开放给玩家,仅特定活动时系统传入
    activityMapLineDict = IpyGameDataPY.GetFuncEvalCfg("MapLine", 2, {})
    if mapID in activityMapLineDict:
        activityLineID = max(0, activityMapLineDict[mapID] - 1)
    hideNPCIDList = [] # éœ€è¦éšè—çš„NPCID列表
    if gameWorldIndex == activityLineID:
        hideNPCIDList = IpyGameDataPY.GetFuncEvalCfg("MapLine", 3)
        GameWorld.Log("    hideNPCIDList=%s" % hideNPCIDList)
        if gameWorldIndex == activityLineID:
            hideNPCIDList = IpyGameDataPY.GetFuncEvalCfg("MapLine", 3)
            GameWorld.Log("    hideNPCIDList=%s" % hideNPCIDList)
    gameNPC = GameWorld.GetNPCManager()
    npcCount = gameNPC.GetNPCCount()
    for i in xrange(npcCount):