hxp
2025-05-19 5bfcd3104f7c2fa25995bc0184e6c33c818e3cf8
16 卡牌服务端(ServersConfig先提到配置json文件)
9个文件已修改
78 ■■■■■ 已修改文件
PySysDB/生成IpyGameDataPY/IpyGameDataPYCreater.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCRealmRefresh.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Config/DBConfig.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/DBCommon/GlobalFunctions.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
PySysDB/Éú³ÉIpyGameDataPY/IpyGameDataPYCreater.py
@@ -57,7 +57,7 @@
    StructFileName = sys.argv[1]
    if StructFileName == "PySysDBPY.h":
        IpyGameDataPYFile = CodeProjectPath + "\\ZoneServerGroup\\map1_8G\\MapServer\\MapServerData\\Script\\"
        LoadStructPath = "ChConfig.GetDBPath()"
        LoadStructPath = "ChConfig.GetServerConfigPath()"
    elif StructFileName == "PySysDBG.h":
        IpyGameDataPYFile = CodeProjectPath + "\\CoreServerGroup\\GameServer\\Script\\"
        LoadStructPath = "ChConfig.GetAppPath()"
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -54,7 +54,12 @@
# @param æ— å‚æ•°
# @return è¿”回值当前的DB路径
def GetDBPath():
    return MapServerPath.split("ZoneServerGroup")[0] + "ZoneServerGroup\\map1_8G\\MapServer\\MapServerData\\Script\\PyMongoDB"
    return MapServerPath + "Script\\PyMongoDB"
def GetServerConfigPath():
    ## èŽ·å–ä»¥Map为单服的服务器配置路径
    mapID = IPY_GameWorld.IPY_GameWorld().GetMapID()
    return MapServerPath + "ServerConfig\\m_%s" % mapID
def GetServerRootPath():
    ##获取服务器根路径
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1328,7 +1328,7 @@
    ## èŽ·å–æœåŠ¡å™¨ID所属主服ID
    ServerIDMainServerDict = IpyGameDataPY.GetConfigEx("ServerIDMainServerDict")
    if ServerIDMainServerDict == None:
        filePath = ChConfig.GetDBPath() + ("\\MixServerMap_%s.json" % GetPlatform())
        filePath = ChConfig.GetServerConfigPath() + ("\\MixServerMap_%s.json" % GetPlatform())
        if not os.path.isfile(filePath):
            SendGameErrorEx("GetMainServerIDError", "file can not found. %s" % filePath)
        else:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/IpyGameDataPY.py
@@ -6918,9 +6918,9 @@
    
    def __LoadFileData(self, tableName, onlyCheck=False):
        # @param onlyCheck: æ˜¯å¦ä»…检查格式,一般启动时用
        curPath = ChConfig.GetDBPath() + "\\PySysDB\\" + tableName + ".txt"
        curPath = ChConfig.GetServerConfigPath() + "\\PySysDB\\" + tableName + ".txt"
        if not os.path.isfile(curPath):
            curPath = ChConfig.GetDBPath() + "\\PySysDB\\tag" + tableName + ".txt"
            curPath = ChConfig.GetServerConfigPath() + "\\PySysDB\\tag" + tableName + ".txt"
            if not os.path.isfile(curPath):
                ErrLog("can not find file = %s,%s" % (tableName, curPath))
                raise Exception("can not find file = %s,%s" % (tableName, curPath))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCRealmRefresh.py
@@ -96,7 +96,7 @@
    if key in PyGameData.g_realmDiffNPCRefresh:
        return PyGameData.g_realmDiffNPCRefresh[key]
    
    filePath = os.path.join(ChConfig.GetDBPath(), "SysDB", "tagNPCRefresh.txt")
    filePath = os.path.join(ChConfig.GetServerConfigPath(), "SysDB", "tagNPCRefresh.txt")
    if not os.path.isfile(filePath):
        GameWorld.ErrLog("can not find file = %s" % filePath)
        raise Exception("can not find file = %s" % filePath)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/Config/DBConfig.py
@@ -155,14 +155,14 @@
        config = ConfigParser.ConfigParser()
        
        #读取数据库配置文件config\\config.ini
        config.read(os.path.join(GlobalFunctions.getAppPath(), 'config\\config.ini'))
        config.read(os.path.join(GlobalFunctions.getServerConfigPath(), 'config.ini'))
        for k, v in dbconfig.items(): 
            value = ReadCongfigValue(config, v[1], k, v[0])
            if value == None:return False
            setattr(self_module, k, value)
        
        #读取数据库配置文件PyMongoDataServer.ini
        config.read(os.path.join(GlobalFunctions.getAppPath(), 'PyMongoDataServer.ini'))
        config.read(os.path.join(GlobalFunctions.getServerConfigPath(), 'PyMongoDataServer.ini'))
        for k, v in BaseConfig.items(): 
            value = ReadCongfigValue(config, v[1], k, v[0])
            if value == None:return False
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/DBCommon/GlobalFunctions.py
@@ -30,6 +30,9 @@
def getAppPath():
    return ChConfig.GetDBPath()
def getServerConfigPath():
    ##单服配置路径
    return ChConfig.GetServerConfigPath()
def GetTransactionIDStr(len):
    nowtime = datetime.today()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/LogicProcess/UserCtrlDB.py
@@ -82,7 +82,7 @@
    centerVersion = ""
    try:
        cfGameVer = ConfigParser.ConfigParser()
        cfGameVer.read(os.path.join(GlobalFunctions.getAppPath(), 'GameVersion.ini'))
        cfGameVer.read(os.path.join(GlobalFunctions.getServerConfigPath(), 'GameVersion.ini'))
        
        gameID = cfGameVer.get("config", "GameID")
        curVersion = cfGameVer.get("config", "Version")
@@ -2930,7 +2930,7 @@
                mylog.info("###dgPlayerInit cntError accid = %s" % queryAccid)
                PegasusCollectorProxy.ErrorReport("login data cntError accid=%s" % queryAccid)
                dbIni = ConfigParser.ConfigParser() # æ¯æ¬¡é‡æ–°åŠ è½½ï¼Œç¡®ä¿éšæ—¶ä¿®æ”¹æœ‰æ•ˆ
                dbIni.read(os.path.join(GlobalFunctions.getAppPath(), 'PyMongoDataServer.ini'))
                dbIni.read(os.path.join(GlobalFunctions.getServerConfigPath(), 'PyMongoDataServer.ini'))
                DataCntErrorKick = dbIni.has_option("dataset", "DataCntErrorKick") and (dbIni.getint("dataset", "DataCntErrorKick") == 1) # æ•°æ®å­˜å–条数异常时是否禁止登录
                if DataCntErrorKick:
                    self.sendFailString(CommonDefine.dgPlayerInit, pack, disAccStateError)
@@ -5876,95 +5876,95 @@
    #读取静态表,与数据库无关
    def OnGetGameData(self):
        sysData = DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinNPC,
                                                    os.path.join(GlobalFunctions.getAppPath(),
                                                    os.path.join(GlobalFunctions.getServerConfigPath(),
                                                                    CommonDefine.SYSDB_PATH,
                                                                    'tagChinNPC.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagNPCRefresh,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagNPCRefresh.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinSkill,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinSkill.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinExp,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinExp.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinItem,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinItem.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagTransportRefresh,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagTransportRefresh.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinShopItem,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinShopItem.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagBornRefresh,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagBornRefresh.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinMixItem,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinMixItem.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagBuildEquip,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagBuildEquip.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagSuiteActivation,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagSuiteActivation.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagSuiteEffect,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagSuiteEffect.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagRepeatEvent,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagRepeatEvent.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagEffectRefresh,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagEffectRefresh.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagChinMap,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagChinMap.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagDBStoreItem,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagDBStoreItem.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagOnMissionDelete,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagOnMissionDelete.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagPet,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagPet.txt'))   
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagPetGrade,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagPetGrade.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagPetFriendliness,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagPetFriendliness.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagPetExp,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagPetExp.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagNPC_Item_Pet,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagNPC_Item_Pet.txt'))
        sysData += DataServerGameData.sysDBLoadFromFile(DataServerGameData.tagFlyObjBaseInfo,
                                            os.path.join(GlobalFunctions.getAppPath(),
                                            os.path.join(GlobalFunctions.getServerConfigPath(),
                                                        CommonDefine.SYSDB_PATH,
                                                        'tagFlyObjBaseInfo.txt'))
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ReadChConfig.py
@@ -220,7 +220,7 @@
    global PyMongoDataServerConfig
    
    if not PyMongoDataServerConfig:
        dbAPPath = ChConfig.GetDBPath() + "\\PyMongoDataServer.ini"
        dbAPPath = ChConfig.GetServerConfigPath() + "\\PyMongoDataServer.ini"
        
        if not os.path.isfile(dbAPPath):
            GameWorld.Log('无法找到文件 = %s'%(dbAPPath))
@@ -261,7 +261,7 @@
    if key not in Def_DBCfgFilePath:
        GameWorld.Log('DB配置中未发现Key文件 = %s' % (key))
        return
    filePath = ChConfig.GetDBPath() + Def_DBCfgFilePath[key]
    filePath = ChConfig.GetServerConfigPath() + Def_DBCfgFilePath[key]
    
    retData = __ReadConfigDataEx(key, filePath, needEval)
    if not retData: