From a569a7bb683bb01edb14be508e123ba556305f9f Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 26 十二月 2025 14:00:40 +0800
Subject: [PATCH] 129 【战斗】战斗系统-服务端(曹操所有技能;增加触发方式50-敌方受控时(硬控);)

---
 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