From f9a4b93791a2dba5e61329dc963604a7fcc2218d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 12 八月 2021 12:04:31 +0800
Subject: [PATCH] 8585 【BT3】【主干】竞技场(还原机器人等级范围规则)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py
index a623f65..39b0f3d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldArena.py
+++ b/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):
--
Gitblit v1.8.0