| | |
| | |
|
| | | 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):
|
| | | ## 更新仙盟排行榜
|
| | |
| | | playerJob = 0
|
| | | playerName = ""
|
| | | playerRealmLV = 0
|
| | | face = 0
|
| | | facePic = 0
|
| | |
|
| | | if curPlayer:
|
| | | playerID = curPlayer.GetID()
|
| | |
| | | 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:
|
| | |
| | | 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])
|
| | |
| | | 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
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | |
| | |
|
| | | billboardMgr = GameWorld.GetBillboard()
|
| | | for billboardIndex in ShareDefine.BillboardTypeList:
|
| | | if billboardIndex in ShareDefine.FamilyBillboardList:
|
| | | continue
|
| | | billBoard = billboardMgr.FindBillboard(billboardIndex)
|
| | | if not billBoard:
|
| | | #找不到这类型排行榜
|
| | |
| | | #该玩家没有在排行榜上
|
| | | 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
|