Fix: 修复服务器启动报错;
读功能配置表错误增加详细错误日志输出;
| | |
| | | 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
|
| | |
| | | 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
|
| | |
| | | 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):
|