From 6431718d4fabf83de74f7abe40f671590dbf91c0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 26 十二月 2025 09:08:44 +0800
Subject: [PATCH] 358 【内政】红颜系统-服务端(马车炸弹不出裂纹;马车炸开后通知马车空白;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
index 08d278d..c122de1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
@@ -27,10 +27,10 @@
import os
import GameWorld
import md5
+import IpyGameDataPY
import FormulaControl
import ConfigParser
import ShareDefine
-import MapConfig
#---------------------------------------------------------------------
#全局变量
#---------------------------------------------------------------------
@@ -40,6 +40,7 @@
AllChConfig = {}
GeneralProgramme = {}
+ServersRouteConfig = None
PyMongoDataServerConfig = None
DBAllChConfig = {}
@@ -98,6 +99,14 @@
return
+def SetReloadConfig():
+ ## 标记重读配置
+ GameWorld.Log("=== 设置重读配置 ===")
+ GameWorld.GetGameWorld().SetGameWorldDict(ShareDefine.Def_Notify_WorldKey_ReloadConfig, 1)
+ IpyGameDataPY.IPYData.IpyDataClear()
+ import DataRecordPack
+ DataRecordPack.DR_Reload("config")
+ return
## 重读,清除配置
# @param key 表名
@@ -106,6 +115,7 @@
global AllChConfig
global GeneralProgramme
global PyMongoDataServerConfig
+ global ServersRouteConfig
global DBAllChConfig
#重读所有的配置表
@@ -113,9 +123,8 @@
GeneralProgramme = {}
FormulaControl.ClearCompileFormulaDist()
PyMongoDataServerConfig = None
+ ServersRouteConfig = None
DBAllChConfig = {}
-
- MapConfig.ClearConfig()
GameWorld.Log('MapServer_Reload_ChConfig')
#关闭字典
@@ -211,6 +220,30 @@
## -----------------------------------------------------------
+def GetServersRouteConfig(section, option, raw=False, defaultValue=None, isLog=True):
+ global ServersRouteConfig
+
+ if not ServersRouteConfig:
+ filePath = ChConfig.GetServersRoutePath() + "\\PyMongoDataServer.ini"
+
+ if not os.path.isfile(filePath):
+ GameWorld.Log('无法找到文件 = %s'%(filePath))
+ raise Exception('无法找到文件 = %s'%(filePath))
+
+ ServersRouteConfig = ConfigParser.ConfigParser()
+ ServersRouteConfig.read(filePath)
+ GameWorld.DebugLog("Reload %s" % str(filePath))
+
+ if not ServersRouteConfig.has_option(section, option):
+ if defaultValue != None:
+ return defaultValue
+ if isLog:
+ GameWorld.ErrLog("ServersRoute->PyMongoDataServer.ini找不到配置: section=%s,option=%s" % (section, option))
+ return ""
+
+ strParam = ServersRouteConfig.get(section, option, raw)
+ return strParam
+
## PyMongoDataServer.ini配置读取
# @param section: 分段区块名
# @param option: 配置项名
--
Gitblit v1.8.0