From 00f4a55d20b44485efb11172bf61263e8cfb57fa Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 12 三月 2025 15:09:14 +0800
Subject: [PATCH] 10416 【英文】【bt】【GM】【砍树】登录基金和幻境基金 完成后可以重置购买(重置关联的充值ID)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 100 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 73 insertions(+), 27 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
index 58dc777..e68a555 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py
@@ -154,27 +154,40 @@
return
-def __CheckFightPowerBillboard():
- ## 由于战力修改为支持超过20E,所以需要处理下战力相关榜单,原 cmpValue 值移动到 cmpValue2
-
- eventKey = "FightPowerBillboardMoveValue"
- if PlayerDBGSEvent.GetDBGSTrig_ByKey(eventKey):
+def FixBillboardBigCmpValue():
+ ## 修正部分榜单大比较值,支持超20亿,主要为了模块战力等支持超20亿
+ if PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_FixBillboardBigCmpValue):
+ GameWorld.Log("修正部分榜单大比较值支持超20亿已经处理过")
return
- PlayerDBGSEvent.SetDBGSTrig_ByKey(eventKey, 1)
- GameWorld.Log("处理战力榜超过20E支持!")
+ PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_FixBillboardBigCmpValue, 1)
+ fixBillTypeList = [ShareDefine.Def_BT_FightPower_Horse]
+ fixBillTypeList += ShareDefine.Def_Campaign_Billboard_Dict.values()
+ GameWorld.Log("修正部分榜单大比较值支持超20亿: %s" % fixBillTypeList)
- billboardList = [ShareDefine.Def_BT_FightPower] + ShareDefine.JobFightPowerBillboardDict.values()
- for billboardType in billboardList:
- billboard = GameWorld.GetBillboard().FindBillboard(billboardType)
- if not billboard:
+ billboardMgr = GameWorld.GetBillboard()
+ for billboardType in fixBillTypeList:
+ billBoard = billboardMgr.FindBillboard(billboardType)
+ dataCount = billBoard.GetCount()
+ if not dataCount:
continue
- GameWorld.Log(" billboardType=%s,count=%s" % (billboardType, billboard.GetCount()))
- for index in xrange(billboard.GetCount()):
- billBoardData = billboard.At(index)
- if not billBoardData:
+ DataRecordPack.DR_BillboardData(billboardType, "FixBillboardBigCmpValue")
+ GameWorld.Log("修正榜单大比较值: billboardType=%s" % billboardType)
+ for index in range(dataCount):
+ boardData = billBoard.At(index)
+ if not boardData:
continue
- billBoardData.SetCmpValue2(billBoardData.GetCmpValue())
- billBoardData.SetCmpValue(0)
+ dataID = boardData.GetID()
+ cmpValue = boardData.GetCmpValue()
+ cmpValue2 = boardData.GetCmpValue2()
+ if cmpValue2:
+ GameWorld.Log(" index=%s,dataID=%s, keep CmpValue=%s,CmpValue2=%s" % (index, dataID, cmpValue, cmpValue2))
+ continue
+ boardData.SetCmpValue(0)
+ boardData.SetCmpValue2(cmpValue)
+
+ cmpValue = boardData.GetCmpValue()
+ cmpValue2 = boardData.GetCmpValue2()
+ GameWorld.Log(" index=%s,dataID=%s, Update CmpValue=%s,CmpValue2=%s" % (index, dataID, cmpValue, cmpValue2))
return
@@ -187,7 +200,6 @@
#排序一次排行榜
billBoard.Sort()
- __CheckFightPowerBillboard()
return
def CopyBillboard(newBillboardIndex, oldBillboardIndex):
@@ -642,11 +654,10 @@
def GetBillboardOperateInfo(curPlayer):
# 排行榜中所保存的运营商相关信息
- return curPlayer.GetFace()
-# platform = curPlayer.GetAccID()
-# if platform in ["tencent"]:
-# return curPlayer.GetOperateInfo()
-# return platform
+ platform = curPlayer.GetAccID()
+ if platform in ["tencent"]:
+ return curPlayer.GetOperateInfo()
+ return platform
def UpdateFamilyBillboard(bType, familyBillInfo, cmpValue, cmpValue2=0):
## 更新仙盟排行榜
@@ -675,6 +686,8 @@
playerJob = 0
playerName = ""
playerRealmLV = 0
+ face = 0
+ facePic = 0
if curPlayer:
playerID = curPlayer.GetID()
@@ -682,12 +695,16 @@
playerName = curPlayer.GetName()
playerRealmLV = curPlayer.GetOfficialRank()
playerOpInfo = GetBillboardOperateInfo(curPlayer)
+ face = curPlayer.GetFace()
+ facePic = curPlayer.GetFacePic()
else:
socialPlayer = PyDataManager.GetPersonalSocialManager().GetSocialPlayer(playerID)
if socialPlayer:
playerJob = socialPlayer.playerInfo.Job
playerName = socialPlayer.playerInfo.PlayerName
playerRealmLV = socialPlayer.playerInfo.RealmLV
+ face = socialPlayer.playerInfo.Face
+ facePic = socialPlayer.playerInfo.FacePic
else:
curCache = PlayerViewCache.FindViewCache(playerID)
if curCache:
@@ -695,6 +712,8 @@
playerJob = cacheDict["Job"]
playerName = cacheDict["Name"]
playerRealmLV = cacheDict["RealmLV"]
+ face = cacheDict.get("Face", 0)
+ facePic = cacheDict.get("FacePic", 0)
if not playerName and playerID < 10000:
playerJob = random.choice([1, 2])
@@ -711,7 +730,7 @@
if autoSort:
gameWorld.SetDict(Def_Key_BillboardSortTick % bType, tick)
- UpdatePlayerBillboard(playerID, playerName, playerOpInfo, bType, playerJob, value1, value2, cmpValue, autoSort, cmpValue2, cmpValue3)
+ UpdatePlayerBillboard(playerID, playerName, playerOpInfo, bType, playerJob, value1, value2, cmpValue, autoSort, cmpValue2, cmpValue3, value3=face, value4=facePic)
return
#---------------------------------------------------------------------
@@ -766,6 +785,9 @@
else:
cmpValue3 = playerBillBoardData.GetCmpValue3()
+ 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)
+
#设置排行榜数据
playerBillBoardData.SetType(billboardIndex)
#附属类型
@@ -791,8 +813,6 @@
if cmpValue3 > 0:
playerBillBoardData.SetCmpValue3(cmpValue3)
- 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
@@ -975,6 +995,8 @@
billboardMgr = GameWorld.GetBillboard()
for billboardIndex in ShareDefine.BillboardTypeList:
+ if billboardIndex in ShareDefine.FamilyBillboardList:
+ continue
billBoard = billboardMgr.FindBillboard(billboardIndex)
if not billBoard:
#找不到这类型排行榜
@@ -985,6 +1007,30 @@
#该玩家没有在排行榜上
continue
- playerBillBoardData.SetName2(str(curFace))
+ playerBillBoardData.SetValue3(curFace)
+
+ return
+
+def UpdateBillboardFacePic(curPlayer):
+ ## 更新排行榜中的玩家头像
+
+ curPlayerID = curPlayer.GetID()
+ curFacePic = curPlayer.GetFacePic()
+
+ billboardMgr = GameWorld.GetBillboard()
+ for billboardIndex in ShareDefine.BillboardTypeList:
+ if billboardIndex in ShareDefine.FamilyBillboardList:
+ continue
+ billBoard = billboardMgr.FindBillboard(billboardIndex)
+ if not billBoard:
+ #找不到这类型排行榜
+ continue
+
+ playerBillBoardData = billBoard.FindByID(curPlayerID)
+ if not playerBillBoardData:
+ #该玩家没有在排行榜上
+ continue
+
+ playerBillBoardData.SetValue4(curFacePic)
return
--
Gitblit v1.8.0