From a972cc7ea6c2cd055a2c6a45df80fb79a52d4b00 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 06 十二月 2022 18:31:52 +0800 Subject: [PATCH] 9651 【后端】玩家个人数据保存问题(地图玩家支持按每个玩家独立备档) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py index ec2fdd2..0acb2a0 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py @@ -216,7 +216,7 @@ # @param option: 配置项名 # @return # @remarks \db\PyMongoDataServer\PyMongoDataServer.ini配置读取 -def GetPyMongoConfig(section, option, raw=False): +def GetPyMongoConfig(section, option, raw=False, defaultValue=None, isLog=True): global PyMongoDataServerConfig if not PyMongoDataServerConfig: @@ -231,7 +231,10 @@ GameWorld.DebugLog("Reload dbAPPath=%s" % str(dbAPPath)) if not PyMongoDataServerConfig.has_option(section, option): - GameWorld.ErrLog("PyMongoDataServer.ini找不到配置: section=%s,option=%s" % (section, option)) + if defaultValue != None: + return defaultValue + if isLog: + GameWorld.ErrLog("PyMongoDataServer.ini找不到配置: section=%s,option=%s" % (section, option)) return "" strParam = PyMongoDataServerConfig.get(section, option, raw) -- Gitblit v1.8.0