From 89cd5c46258340014d31e4b8c6ee7df0e3b00c2d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 16 三月 2026 19:51:54 +0800
Subject: [PATCH] 16 卡牌服务端(自动开服相关;A103增加同步开服时间;增加是否允许加入跨服标记,默认否;跨服公会仅在允许跨服时才会加入跨服;优化ServersConfig.json配置,支持后台导出,优化战斗服务器配置;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py | 19 +++++++++++++++++--
1 files changed, 17 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 83033e1..ede0efe 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
@@ -257,12 +257,27 @@
GameWorld.Log('无法找到文件 = %s'%(filePath))
raise Exception('无法找到文件 = %s'%(filePath))
+ batFilePath = ChConfig.GetServersRoutePath() + "\\Config\\BattleServer.json"
+ if not os.path.isfile(batFilePath):
+ GameWorld.Log('无法找到文件 = %s'%(batFilePath))
+ raise Exception('无法找到文件 = %s'%(batFilePath))
+
f = open(filePath, 'r')
- strMsg = f.read()
+ serverDict = eval(f.read())
f.close()
- ServersConfigDict = eval(strMsg)
+ f = open(batFilePath, 'r')
+ batServerDict = eval(f.read())
+ f.close()
+ groupName = GameWorld.GetServerGroupName()
+ ServersConfigDict = {}
+ ServersConfigDict = {int(k):v for k, v in serverDict.items()}
+ for batServerID, mapID in batServerDict.items():
+ if batServerID in ServersConfigDict:
+ continue
+ ServersConfigDict[batServerID] = [groupName, mapID, ShareDefine.serverType_Battle]
+
return ServersConfigDict
## PyMongoDataServer.ini配置读取
--
Gitblit v1.8.0