From 0b52fea0c2dec053c44678d94bd66c10db1b0b91 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 06 四月 2021 17:27:57 +0800 Subject: [PATCH] 8870 【BT2】【后端】战力、伤害、玩家生命的数值调整为大数值(超21亿) --- ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py index f604d6c..29bc77e 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerBillboard.py @@ -20,7 +20,9 @@ import GameWorld import ChConfig import ShareDefine +import PlayerControl import ChPyNetSendPack +import PlayerDBGSEvent import NetPackCommon import DataRecordPack import PlayerFamily @@ -74,6 +76,30 @@ return +def __CheckFightPowerBillboard(): + ## 由于战力修改为支持超过20E,所以需要处理下战力相关榜单,原 cmpValue 值移动到 cmpValue2 + + eventKey = "FightPowerBillboardMoveValue" + if PlayerDBGSEvent.GetDBGSTrig_ByKey(eventKey): + return + PlayerDBGSEvent.SetDBGSTrig_ByKey(eventKey, 1) + GameWorld.Log("处理战力榜超过20E支持!") + + billboardList = [ShareDefine.Def_BT_FightPower] + ShareDefine.JobFightPowerBillboardDict.values() + for billboardType in billboardList: + billboard = GameWorld.GetBillboard().FindBillboard(billboardType) + if not billboard: + continue + GameWorld.Log(" billboardType=%s,count=%s" % (billboardType, billboard.GetCount())) + for index in xrange(billboard.GetCount()): + billBoardData = billboard.At(index) + if not billBoardData: + continue + billBoardData.SetCmpValue2(billBoardData.GetCmpValue()) + billBoardData.SetCmpValue(0) + + return + def SortServerBillboard(): ##排序所有排行榜 billboardMgr = GameWorld.GetBillboard() @@ -82,7 +108,8 @@ billBoard = billboardMgr.FindBillboard(index) #排序一次排行榜 billBoard.Sort() - + + __CheckFightPowerBillboard() return def CopyBillboard(newBillboardIndex, oldBillboardIndex): @@ -463,13 +490,13 @@ # 以下为榜单附加特殊处理 if bType == ShareDefine.Def_BT_FightPower: playerID = bID - fightPowerTotal = cmpValue + fightPowerTotal = cmpValue * ChConfig.Def_PerPointValue + cmpValue2 familyID = exInfo[0] playerJob = bType2 curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID) if curPlayer: - curPlayer.SetFightPower(fightPowerTotal) + PlayerControl.SetFightPower(curPlayer, fightPowerTotal) #更新战盟成员战力 PlayerFamily.UpdFamilyMemberFightPower(familyID, playerID, fightPowerTotal) @@ -478,7 +505,7 @@ job = playerJob % 10 if job in ShareDefine.JobFightPowerBillboardDict: jobBType = ShareDefine.JobFightPowerBillboardDict[job] - UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort) + UpdatePlayerBillboard(bID, bName, bName2, jobBType, bType2, value1, value2, cmpValue, autoSort, cmpValue2) gameWorld.SetDict(Def_Key_BillboardNeedSort % jobBType, 1) #__UpdateBillboardSortState(gameWorld, jobBType, autoSort, isUpd) -- Gitblit v1.8.0