| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | | import ShareDefine
|
| | | import PlayerControl
|
| | | import ChPyNetSendPack
|
| | | import PlayerDBGSEvent
|
| | | import NetPackCommon
|
| | | import DataRecordPack
|
| | | import PlayerFamily
|
| | |
| | |
|
| | | 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()
|
| | |
| | | billBoard = billboardMgr.FindBillboard(index)
|
| | | #排序一次排行榜
|
| | | billBoard.Sort()
|
| | |
|
| | | |
| | | __CheckFightPowerBillboard()
|
| | | return
|
| | |
|
| | | def CopyBillboard(newBillboardIndex, oldBillboardIndex):
|
| | |
| | | # 以下为榜单附加特殊处理
|
| | | 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)
|
| | |
| | | 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)
|
| | |
|