From d74ffd4e91154ea48d36b7ea153907b171c47b74 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 06 五月 2024 18:31:35 +0800
Subject: [PATCH] 10033 【后端】仙树升级系统及砍树产出规则(仙树等级前后端统一:从1开始,1代表1级;)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py |   48 ++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
index 454063a..36ee9a2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
@@ -507,12 +507,28 @@
             
     return
 
+def DelJobFightPowerBillboard(curPlayer, delJob):
+    ## 删除玩家对应职业战力榜  - 一般是玩家职业改变了,需要删除旧职业的职业战力榜单
+    if delJob not in ShareDefine.JobFightPowerBillboardDict:
+        return
+    jobBType = ShareDefine.JobFightPowerBillboardDict[delJob]
+    playerID = curPlayer.GetPlayerID()
+    billboardMgr = GameWorld.GetBillboard()
+    playerBillBoard = billboardMgr.FindBillboard(jobBType)
+    if not playerBillBoard:
+        return
+    if playerBillBoard.FindByID(playerID):
+        playerBillBoard.DeleteByID(playerID)
+        GameWorld.DebugLog("删除玩家职业战力榜单: delJob=%s,jobBType=%s" % (delJob, jobBType), playerID)
+    return
+
 def GetBillboardOperateInfo(curPlayer):
     # 排行榜中所保存的运营商相关信息
-    platform = curPlayer.GetAccID()
-    if platform in ["tencent"]:
-        return curPlayer.GetOperateInfo()
-    return platform
+    return curPlayer.GetFace()
+#    platform = curPlayer.GetAccID()
+#    if platform in ["tencent"]:
+#        return curPlayer.GetOperateInfo()
+#    return platform
 
 def UpdatePlayerBillboardEx(curPlayer, playerID, bType, cmpValue, cmpValue2=0, cmpValue3=0, value1=0, value2=0, autoSort=False):
     ## 更新玩家排行榜
@@ -613,6 +629,9 @@
         if opInfo != str(curPlayerOpInfo):
             playerBillBoardData.SetName2(str(curPlayerOpInfo))
             GameWorld.DebugLog("    更新operatInfo=%s" % curPlayerOpInfo, curPlayerID)
+        if playerBillBoardData.GetType2() != billboardType:
+            playerBillBoardData.SetType2(billboardType)
+            GameWorld.DebugLog("    更新Type2=%s" % billboardType, curPlayerID)
         return False
     
     # 没设置值默认为时间time,先上榜的排前面
@@ -808,3 +827,24 @@
         
     return
 
+def UpdateBillboardFace(curPlayer):
+    ## 更新排行榜中的玩家头像
+    
+    curPlayerID = curPlayer.GetID()
+    curFace = curPlayer.GetFace()
+    
+    billboardMgr = GameWorld.GetBillboard()
+    for billboardIndex in ShareDefine.BillboardTypeList:
+        billBoard = billboardMgr.FindBillboard(billboardIndex)
+        if not billBoard:
+            #找不到这类型排行榜
+            continue
+        
+        playerBillBoardData = billBoard.FindByID(curPlayerID)
+        if not playerBillBoardData:
+            #该玩家没有在排行榜上
+            continue
+        
+        playerBillBoardData.SetName2(str(curFace))
+        
+    return

--
Gitblit v1.8.0