10350 【GM】【越南】【英文】【BT】【砍树】跨服竞技场优化(没有匹配到机器人时概率直接匹配到机器人)
1个文件已修改
8 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmPK.py
@@ -587,6 +587,7 @@
    GameWorld.DebugLog("积分榜可匹配的排名玩家ID列表: %s,%s" % (len(loopBillPlayerIDList), loopBillPlayerIDList), playerID)
    randPackPlayerIDList = None # 可随机匹配的打包数据战力排名玩家ID列表
    
    haveRobot = False
    for matchIndex in range(matchCount):
        GameWorld.DebugLog("匹配第%s个: matchIndex=%s,playerBillIndex=%s,billLoopIndexList=%s" % (matchIndex + 1, matchIndex, playerBillIndex, billLoopIndexList), playerID)
        matchID = 0
@@ -619,9 +620,16 @@
        # 3. 最终还没有,直接机器人
        if not matchID:
            matchID = matchIndex + 1 # 机器人ID固定为 matchIndex + 1
            haveRobot = True
        matchIDList.append(matchID)
        GameWorld.DebugLog("        本段随机匹配结果: matchIndex=%s,matchID=%s,randIDList=%s,matchIDList=%s" % (matchIndex, matchID, randIDList, matchIDList), playerID)
        
    #最后一个如果不是机器人,则概率直接匹配机器人
    if not haveRobot and GameWorld.CanHappen(IpyGameDataPY.GetFuncCfg("CrossRealmPKMatch3", 3)):
        robotID = matchCount
        matchIDList[-1] = robotID
        GameWorld.DebugLog("没有匹配到机器人,概率直接匹配到机器人: robotID=%s" % robotID, playerID)
    GameWorld.DebugLog("最终匹配结果: matchIDList=%s" % str(matchIDList), playerID)
    return matchIDList