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