| | |
| | | # 删除对战记录
|
| | | GameWorld.GetUniversalRecMgr().Delete(Def_RecType_ArenaBattleRecord)
|
| | | PyGameData.g_arenaPlayerBattleRecDict = {}
|
| | | PyGameData.g_arenaPlayerMatchDict = {}
|
| | |
|
| | | # 更新新赛季信息
|
| | | if openServerDay <= customMaxServerDay and OSSeasonState == 0:
|
| | |
| | | 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 = 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 = eval(IpyGameDataPY.GetFuncCfg("ArenaRobot", 3))
|
| | | robotMaxLV = max(minLV, min(maxLV, robotMaxLV))
|
| | | GameWorld.Log(" 机器人等级范围: worldLV=%s,worldLVTime=%s,maxWorldLVTime=%s,minLV=%s,robotMaxLV=%s" |
| | | % (worldLV, worldLVTime, maxWorldLVTime, minLV, robotMaxLV))
|
| | | GameWorld.Log(" 机器人等级范围: worldLV=%s,minLV=%s,maxLV=%s,robotMaxLV=%s" |
| | | % (worldLV, minLV, maxLV, robotMaxLV))
|
| | | return minLV, robotMaxLV
|
| | |
|
| | | def __RandRobotScoreList(robotMaxCount):
|
| | |
| | | # 随机机器人备用信息
|
| | | openJobList = IpyGameDataPY.GetFuncEvalCfg("OpenJob", 1)
|
| | |
|
| | | randRobotLVScorePerInfo = IpyGameDataPY.GetFuncEvalCfg("ArenaMatch", 3)
|
| | | randRobotLVPerRange, randRobotScorePerRange = randRobotLVScorePerInfo
|
| | | minLV, maxLV = IpyGameDataPY.GetFuncEvalCfg("ArenaRobot", 2) # 机器人最小、最大等级
|
| | | randMinLV = min(minLV, int(playerLV * randRobotLVPerRange[0] / 100.0))
|
| | | randMaxLV = min(maxLV, int(playerLV * randRobotLVPerRange[1] / 100.0))
|
| | | minLV, _ = IpyGameDataPY.GetFuncEvalCfg("ArenaRobot", 2) # 机器人最小、最大等级
|
| | | randMinLV, randMaxLV = minLV - 10, minLV
|
| | | #randMinLV = min(minLV, int(playerLV * randRobotLVPerRange[0] / 100.0))
|
| | | #randMaxLV = min(maxLV, int(playerLV * randRobotLVPerRange[1] / 100.0))
|
| | |
|
| | | randRobotScorePerRange = IpyGameDataPY.GetFuncEvalCfg("ArenaMatch", 3)
|
| | | randMinScore = int(playerScore * randRobotScorePerRange[0] / 100.0)
|
| | | randMaxScore = int(playerScore * randRobotScorePerRange[1] / 100.0)
|
| | |
|