From a5704bbcc5d2b17998615e9af7f497498a79f90f Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 25 六月 2024 16:15:46 +0800 Subject: [PATCH] 10185 【越南】【港台】【主干】BOSS凭证修改(排行榜优化;跨服榜查看改为直接查跨服数据,支持分页查询;跨服凭证个人榜单最大调整为1000条,其他100;) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py index ea99991..2c80efa 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py @@ -669,14 +669,15 @@ return False isNewData = playerBillBoardData.GetID2() == 0 # 是否是新增的数据 - cmpValueChange = False - if isNewData or playerBillBoardData.GetCmpValue() != cmpValue or playerBillBoardData.GetCmpValue2() != cmpValue2 \ - or playerBillBoardData.GetCmpValue3() != cmpValue3: - cmpValueChange = True - if cmpValue3 == 0: + cmpValueChange = isNewData or playerBillBoardData.GetCmpValue() != cmpValue or playerBillBoardData.GetCmpValue2() != cmpValue2 \ + or (cmpValue3 and playerBillBoardData.GetCmpValue3() != cmpValue3) + if cmpValue3 == 0: + if cmpValueChange: # 时间权值仅在比较值变更的情况下才更新, 防止其他附属值更新时导致比较值相同的玩家名次间会变动的问题 calcTime = GameWorld.ChangeTimeStrToNum("2080-01-01 00:00:00") cmpValue3 = max(0, calcTime - int(time.time())) # 比较值3如果没指定值则默认存当前更新的time + else: + cmpValue3 = playerBillBoardData.GetCmpValue3() #设置排行榜数据 playerBillBoardData.SetType(billboardIndex) @@ -703,8 +704,8 @@ if cmpValue3 > 0: playerBillBoardData.SetCmpValue3(cmpValue3) - GameWorld.DebugLog("更新排行榜值 index=%s,type2=%s,value1=%s,value2=%s,cmpValue=%s,cmpValue2==%s,cmpValue3==%s,isNewData=%s,%s" - % (billboardIndex, type2, value1, value2, cmpValue, cmpValue2, cmpValue3, isNewData, kwargs), curPlayerID) + GameWorld.DebugLog("更新排行榜值 index=%s,type2=%s,value1=%s,value2=%s,cmpValue=%s,cmpValue2==%s,cmpValue3==%s,isNewData=%s,cmpValueChange=%s,%s" + % (billboardIndex, type2, value1, value2, cmpValue, cmpValue2, cmpValue3, isNewData, cmpValueChange, kwargs), curPlayerID) if not cmpValueChange: return True -- Gitblit v1.8.0