9415 【BT】【后端】古神战场(优化玩家在战场结算前掉线后逻辑:结算后强制设置玩家为非跨服状态,防止玩家重连导致还会进入跨服地图然后再被踢出去的无效流程)
2个文件已修改
7 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -967,7 +967,7 @@
    for playerID, playerData in syncPlayerDataInfo.items():
        if PlayerControl.GetDBPlayerAccIDByID(playerID):
            msgInfo = ["BattlefieldOver", [overTime] + playerData]
            CrossRealmPlayer.MapServer_QueryCrossPlayerResult(playerID, "CrossBattlefield", msgInfo)
            CrossRealmPlayer.MapServer_QueryCrossPlayerResult(playerID, "CrossBattlefield", msgInfo, True)
            
    return
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
@@ -435,7 +435,7 @@
    LoginDoUnNotifyCrossMsg(curPlayer)
    return
    
def MapServer_QueryCrossPlayerResult(playerID, callName, msgInfo):
def MapServer_QueryCrossPlayerResult(playerID, callName, msgInfo, offlineExitCross=False):
    ## 同步地图跨服玩家处理信息,玩家可能不在线,缓存后等玩家上线处理,暂不考虑存档问题,服务器维护后未处理的命令将失效
    
    curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
@@ -449,7 +449,8 @@
        msgList = PyGameData.g_unNotifyPlayerCrossMsgDict[playerID]
        msgList.append([callName, msgInfo])
        GameWorld.Log("玩家不在线,添加未通知的跨服命令: %s, msgInfo=%s" % (callName, msgInfo), playerID)
        if offlineExitCross:
            DoOfflinePlayerExitCrossServer(playerID)
    return
def LoginDoUnNotifyCrossMsg(curPlayer):