From 4180ba5f28c47d15a33d99973e2034f5337ab3fc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 20 十二月 2022 17:04:17 +0800
Subject: [PATCH] 9731 【越南】【主干】【BT7】【BT8】转职业(转职附加重置灵根属性点)

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
index 25705b1..530252d 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
@@ -28,6 +28,7 @@
 import PlayerFamily
 import PyDataManager
 import PlayerViewCache
+import IpyGameDataPY
 
 import time
 import random
@@ -35,11 +36,6 @@
 Def_Key_BillboardSortTick = "BillboardSortTick_%s" # 排行榜是否排序tick,参数(排行榜类型)
 Def_Key_BillboardNeedSort = "BillboardNeedSort_%s" # 排行榜是否需要排序,参数(排行榜类型)
 
-#需要每天记录到oss的排行榜类型
-Def_NoteOssBillboardTypeList = [
-    ShareDefine.Def_BT_LV ,                  #个人等级日榜            
-    ShareDefine.Def_BT_FightPower,           #个人战斗力
-                                ]
 #需要每天拷贝昨日榜单的排行榜类型字典
 Def_NeedCopyYesterday_Dict = {
     #昨日榜(拷贝)                                    #今日榜(源数据)
@@ -47,6 +43,7 @@
 
 def NoteOssBillboardInfoByDay():
     ## 每天记录排行榜信息到oss中
+    Def_NoteOssBillboardTypeList = IpyGameDataPY.GetFuncEvalCfg("BillboardSet", 1)
     for billboardType in Def_NoteOssBillboardTypeList:
         DataRecordPack.DR_BillboardDataByDay(billboardType)
     return
@@ -510,6 +507,21 @@
             
     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()
@@ -616,6 +628,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,先上榜的排前面

--
Gitblit v1.8.0