hxp
2021-08-12 f9a4b93791a2dba5e61329dc963604a7fcc2218d
8585 【BT3】【主干】竞技场(还原机器人等级范围规则)
1个文件已修改
25 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py
@@ -375,11 +375,30 @@
def __GetRobotLVRange():
    ## 获取赛季机器人等级范围
    worldLV = max(1, PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv))
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    maxCnt = ipyDataMgr.GetWorldLVCount()
    worldLVTime = 0
    if worldLV <= maxCnt:
        worldLVIpyData = ipyDataMgr.GetWorldLVByIndex(worldLV - 1)
        worldLVTime = worldLVIpyData.GetOpenServerSecond()
    minLV, maxLV = IpyGameDataPY.GetFuncEvalCfg("ArenaRobot", 2) # 机器人最小、最大等级
    robotMaxLV = eval(IpyGameDataPY.GetFuncCfg("ArenaRobot", 3))
    robotMaxLV = minLV
    maxWorldLVTime = eval(IpyGameDataPY.GetFuncCfg("ArenaRobot", 3))
    for i in xrange(worldLV - 1, maxCnt):
        ipyData = ipyDataMgr.GetWorldLVByIndex(i)
        if i == maxCnt - 1:
            robotMaxLV = ipyData.GetWorldLV()
        else:
            nextIpyData = IpyGameDataPY.IPY_Data().GetWorldLVByIndex(i + 1)
            if ipyData.GetOpenServerSecond() <= maxWorldLVTime < nextIpyData.GetOpenServerSecond():
                robotMaxLV = ipyData.GetWorldLV()
                break
    robotMaxLV = max(minLV, min(maxLV, robotMaxLV))
    GameWorld.Log("    机器人等级范围: worldLV=%s,minLV=%s,maxLV=%s,robotMaxLV=%s"
                  % (worldLV, minLV, maxLV, robotMaxLV))
    GameWorld.Log("    机器人等级范围: worldLV=%s,worldLVTime=%s,maxWorldLVTime=%s,minLV=%s,robotMaxLV=%s"
                  % (worldLV, worldLVTime, maxWorldLVTime, minLV, robotMaxLV))
    return minLV, robotMaxLV
def __RandRobotScoreList(robotMaxCount):