From ba67d86ccc7dde96a4fe2bb2ae3abfbd0aacc561 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 十一月 2025 12:00:10 +0800
Subject: [PATCH] 237 【福利内容】每日任务/每周任务/章节奖励-服务端(增加每日任务类型 6 ~ 10)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py |   53 ++++++++++++++++++++++++++++++-----------------------
 1 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
index bde256f..dfb9762 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBillboard.py
@@ -17,6 +17,7 @@
 
 import GameWorld
 import ShareDefine
+import PlayerControl
 import ChPyNetSendPack
 import NetPackCommon
 import IpyGameDataPY
@@ -61,6 +62,26 @@
         # 跨服服务器不用更新本服榜
         return
     
+    return
+
+def UpdatePlayerBillboardName(curPlayer):
+    ## 更新排行榜中的玩家名字记录
+    
+    playerID = curPlayer.GetPlayerID()
+    updName = curPlayer.GetPlayerName()
+    billboardMgr = DBDataMgr.GetBillboardMgr()
+    for billboardType in ShareDefine.BillboardTypeList:
+        if billboardType in ShareDefine.FamilyBillboardList:
+            continue
+        groupList = billboardMgr.GetBillboardGroupList(billboardType)
+        for billboardType, groupValue1, groupValue2 in groupList:
+            billboardObj = billboardMgr.GetBillboard(billboardType, groupValue1, groupValue2)
+            billData = billboardObj.FindByID(playerID)
+            if not billData:
+                continue
+            billData.SetName1(updName)
+            
+    # 跨服榜更新, 待处理
     return
 
 def UpdatePlayerFPTotalBillboard(curPlayer, isForceUpdate=False, isCheckRule=True):
@@ -155,7 +176,7 @@
 #    
 #    return True
 
-def UpdatePlayerBillboard(curPlayer, bType, cmpValue, cmpValue2=0, cmpValue3=0, value1=None, value2=0, autoSort=False, **kwargs):
+def UpdatePlayerBillboard(curPlayer, bType, cmpValue, cmpValue2=0, cmpValue3=0, autoSort=False, **kwargs):
     ## 更新玩家排行榜
     
     #if not cmpValue and not cmpValue2 and not cmpValue3:
@@ -165,8 +186,8 @@
     playerID = curPlayer.GetID()
     playerName = curPlayer.GetPlayerName()
     playerOpInfo = GetBillboardOperateInfo(curPlayer)
-    if value1 == None:
-        value1 = curPlayer.GetOfficialRank()
+    value1 = curPlayer.GetOfficialRank()
+    value2 = PlayerControl.GetTitleID(curPlayer)
     kwargs["value3"] = curPlayer.GetFace()
     kwargs["value4"] = curPlayer.GetFacePic()
     kwargs["value5"] = curPlayer.GetModelMark()
@@ -199,19 +220,12 @@
     cmpValueChange = isNewData or billboardData.GetCmpValue() != cmpValue or billboardData.GetCmpValue2() != cmpValue2 \
         or (cmpValue3 and billboardData.GetCmpValue3() != cmpValue3)
         
-    # 没设置值默认为时间time,先上榜的排前面
-    if cmpValue3 == 0:
-        # 时间权值仅在比较值变更的情况下才更新, 防止其他附属值更新时导致比较值相同的玩家名次间会变动的问题
-        if cmpValueChange:
-            calcTime = GameWorld.ChangeTimeStrToNum("2090-01-01 00:00:00")
-            cmpValue3 = max(0, calcTime - int(time.time())) # 比较值3如果没指定值则默认存当前更新的time
-        else:
-            cmpValue3 = billboardData.GetCmpValue3()
-            
     billboardData.SetCmpValue(cmpValue)
     billboardData.SetCmpValue2(cmpValue2)
     billboardData.SetCmpValue3(cmpValue3)
-    
+    if cmpValueChange or not billboardData.GetTime():
+        billboardData.SetTime(int(time.time()))
+        
     GameWorld.DebugLog("更新排行榜值: billboardType=%s,groupValue1=%s,groupValue2=%s,dataID=%s,cmpValueChange=%s,cmpValue=%s,cmpValue2=%s,cmpValue3=%s" 
                        % (billboardType, groupValue1, groupValue2, dataID, cmpValueChange,
                           cmpValue, cmpValue2, cmpValue3), dataID)
@@ -273,15 +287,6 @@
     cmpValueChange = isNewData or billboardData.GetCmpValue() != cmpValue or billboardData.GetCmpValue2() != cmpValue2 \
         or (cmpValue3 and billboardData.GetCmpValue3() != cmpValue3)
         
-    # 没设置值默认为时间time,先上榜的排前面
-    if cmpValue3 == 0:
-        # 时间权值仅在比较值变更的情况下才更新, 防止其他附属值更新时导致比较值相同的玩家名次间会变动的问题
-        if cmpValueChange:
-            calcTime = GameWorld.ChangeTimeStrToNum("2090-01-01 00:00:00")
-            cmpValue3 = max(0, calcTime - int(time.time())) # 比较值3如果没指定值则默认存当前更新的time
-        else:
-            cmpValue3 = billboardData.GetCmpValue3()
-            
     # 更新所有值
     billboardData.SetType(billboardType)
     billboardData.SetGroupValue1(groupValue1)
@@ -303,7 +308,9 @@
     billboardData.SetCmpValue(cmpValue)
     billboardData.SetCmpValue2(cmpValue2)
     billboardData.SetCmpValue3(cmpValue3)
-    
+    if cmpValueChange or not billboardData.GetTime():
+        billboardData.SetTime(int(time.time()))
+        
     GameWorld.DebugLog("更新排行榜值: billboardType=%s,groupValue1=%s,groupValue2=%s,dataID=%s,isNewData=%s,cmpValueChange=%s,type2=%s,value1=%s,value2=%s,cmpValue=%s,cmpValue2=%s,cmpValue3=%s,%s" 
                        % (billboardType, groupValue1, groupValue2, dataID, isNewData, cmpValueChange,
                           type2, value1, value2, cmpValue, cmpValue2, cmpValue3, kwargs), dataID)

--
Gitblit v1.8.0