hxp
2021-10-25 70c43a79d99c93fc5fe8976006ca1a8a1570a0f5
9302 【BT5】【主干】【后端】GameServer启动慢后续优化处理
2个文件已修改
11 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldProcess.py
@@ -1265,6 +1265,11 @@
    AuctionHouse.OnGameServerInitOK()
    # 注意:跨服相关信息的调用需放在最后,不然可能导致服务器未启动功能或者功能未加载成功导致跨服服务器与子服之间的数据同步可能出现异常的情况
    CrossRealmMsg.OnGameServerInitOK()
    if PyGameData.g_allMapServerInitOK:
        GameWorld.Log("InitGameWorld时AllMapServerInitOK已触发则补触发一次!")
        GameWorld.SendGameError("GameWarning", "InitGameWorld later than AllMapServerInitOK")
        AllMapServerInitOK(tick)
    return
def DoCheckNewServerOpen(tick):
@@ -1354,6 +1359,10 @@
#  @return None
#  @remarks 当一个mapServer开启时,
def AllMapServerInitOK(tick):
    PyGameData.g_allMapServerInitOK = True
    if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit):
        GameWorld.Log("AllMapServerInitOK时GameServer还未启动好!")
        return
    #通知所有地图服务器初始化成功, 同步时间
    GameWorld.GetGameWorld().Notify_AllMapServerInitOK(GameWorld.GetCurrentDataTimeStr())
    
ServerPython/CoreServerGroup/GameServer/Script/PyGameData.py
@@ -12,6 +12,8 @@
#
#---------------------------------------------------------------------
g_allMapServerInitOK = False
g_pyGameDataManager = None
g_commMapLineInfo = {} # 地图线路真实地图虚拟线信息 {(dataMapID, lineID):(realMapID, copyMapID), ...}