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 |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
index 15dea17..c122de1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
@@ -27,6 +27,7 @@
 import os
 import GameWorld
 import md5
+import IpyGameDataPY
 import FormulaControl
 import ConfigParser
 import ShareDefine
@@ -39,6 +40,7 @@
 
 AllChConfig = {}
 GeneralProgramme = {}
+ServersRouteConfig = None
 PyMongoDataServerConfig = None
 DBAllChConfig = {}
 
@@ -97,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 表名
@@ -105,6 +115,7 @@
     global AllChConfig
     global GeneralProgramme
     global PyMongoDataServerConfig
+    global ServersRouteConfig
     global DBAllChConfig
     
     #重读所有的配置表
@@ -112,6 +123,7 @@
     GeneralProgramme = {}
     FormulaControl.ClearCompileFormulaDist()
     PyMongoDataServerConfig = None
+    ServersRouteConfig = None
     DBAllChConfig = {}
     
     GameWorld.Log('MapServer_Reload_ChConfig')
@@ -208,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