| | |
| | | import CrossBillboard |
| | | import PyDataManager |
| | | import CrossRealmMsg |
| | | import GameXiangong |
| | | import GameWorship |
| | | import GameWorld |
| | | |
| | | def OnActStart(actNum, ipyData): |
| | |
| | | accID = curPlayer.GetAccID() |
| | | playerName = curPlayer.GetName() |
| | | job = curPlayer.GetJob() |
| | | face = curPlayer.GetFace() |
| | | facePic = curPlayer.GetFacePic() |
| | | realmLV = curPlayer.GetOfficialRank() |
| | | _, updLotteryScore, isRelationCrossAct = dataMsg |
| | | |
| | |
| | | if isRelationCrossAct: |
| | | #同步跨服 |
| | | playerInfo = {"playerID":playerID, "playerName":playerName, "accID":accID, "job":job, "realmLV":realmLV, |
| | | "playerLotteryScore":updLotteryScore} |
| | | "playerLotteryScore":updLotteryScore, "face":face, "facePic":facePic} |
| | | SyncXianXiaMJToCrossServer(curPlayer, playerInfo) |
| | | return |
| | | |
| | |
| | | accID = playerInfo["accID"] |
| | | realmLV = playerInfo["realmLV"] |
| | | playerLotteryScore = playerInfo["playerLotteryScore"] |
| | | face = playerInfo.get("face", 0) |
| | | facePic = playerInfo.get("facePic", 0) |
| | | |
| | | groupValue1 = zoneID |
| | | |
| | | if playerLotteryScore >= personlLimit: |
| | | name2, type2, value1, value2 = accID, job, realmLV, 0 |
| | | CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_XianXiaMJScore, groupValue1, playerID, playerName, |
| | | name2, type2, value1, value2, playerLotteryScore, autoSort=False) |
| | | name2, type2, value1, value2, playerLotteryScore, autoSort=False, value3=face, value4=facePic) |
| | | return |
| | | |
| | | def OnCrossActIDChange(cfgID, zoneID, ipyData, state): |
| | |
| | | GameWorld.Log("=== 跨服仙匣秘境活动发放榜单奖励! === cfgID=%s,zoneID=%s" % (cfgID, zoneID)) |
| | | |
| | | PersonalTemplateID = ipyData.GetPersonalTemplateID() |
| | | serverIDRangeList = ipyData.GetServerIDRangeList() |
| | | |
| | | __GiveCrossOrderAwardPersonal(cfgID, zoneID, PersonalTemplateID, ShareDefine.Def_CBT_XianXiaMJScore) |
| | | __GiveCrossOrderAwardPersonal(cfgID, zoneID, PersonalTemplateID, ShareDefine.Def_CBT_XianXiaMJScore, serverIDRangeList) |
| | | GameWorld.Log("=================================================================================") |
| | | return |
| | | |
| | | def __GiveCrossOrderAwardPersonal(cfgID, zoneID, templateID, billboardType): |
| | | def __GiveCrossOrderAwardPersonal(cfgID, zoneID, templateID, billboardType, serverIDRangeList): |
| | | |
| | | groupValue1 = zoneID |
| | | billboardMgr = PyDataManager.GetCrossBillboardManager() |
| | |
| | | if not orderIpyDataList: |
| | | return |
| | | |
| | | worshipType = ShareDefine.Def_WorshipType_CrossXianXiaMJ |
| | | syncNewWorshipList = [] |
| | | syncNewXiangongDict = {} |
| | | rankPre = 0 |
| | | billboardIndex = 0 |
| | | for ipyData in orderIpyDataList: |
| | |
| | | scoreAwardExList = scoreAwardEx.keys() |
| | | scoreAwardExList.sort() |
| | | awardItemList = ipyData.GetAwardItemList() |
| | | xiangongID = ipyData.GetXiangongID() |
| | | orderCountTotal = rank - rankPre # 奖励名次数量 |
| | | rankPre = rank |
| | | |
| | |
| | | orderCountTotal -= 1 |
| | | billboardIndex += 1 |
| | | |
| | | GameXiangong.AddXiangongPlayer(xiangongID, playerID, serverIDRangeList, playerRank, syncNewXiangongDict) |
| | | GameWorship.AddWorshipPlayer(worshipType, playerRank, playerID, serverIDRangeList, syncList=syncNewWorshipList) |
| | | GameWorship.SendNewWorshipPlayer(syncNewWorshipList) |
| | | GameXiangong.SendNewXiangongPlayerToClientServer(syncNewXiangongDict) |
| | | return |
| | | |