| | |
| | | import PlayerControl
|
| | | import PyDataManager
|
| | | import NetPackCommon
|
| | | import GameWorship
|
| | | import PyGameData
|
| | | import ChConfig
|
| | | import PlayerFB
|
| | |
| | | champMgr = GetChampionshipMgr()
|
| | | champMgr.ClearOfficialZone() # 最终结算重置仙官信息,替换最新仙官
|
| | |
|
| | | # 膜拜重置
|
| | | worshipType = ShareDefine.Def_WorshipType_CrossChampionship
|
| | | GameWorship.DelWorshipPlayer(worshipType)
|
| | | |
| | | pkZoneIDList = champMgr.GetChampPKZoneIDList()
|
| | | GameWorld.Log("pkZoneIDList=%s" % pkZoneIDList)
|
| | |
|
| | | worshipList = []
|
| | | for zoneID in pkZoneIDList:
|
| | | GameWorld.Log("=== 结算排位分区: zoneID=%s ===" % zoneID, zoneID)
|
| | | finalPlayerIDList = []
|
| | |
| | |
|
| | | offZoneMgr.officialInfo[officialID] = offObj
|
| | |
|
| | | worshipValue = rank
|
| | | if GameWorship.GetWorshipIpyData(worshipType, worshipValue):
|
| | | worshipData = GameWorship.AddWorshipPlayer(playerID, worshipType, worshipValue, zoneID=zoneID, isNotify=False)
|
| | | worshipList.append(worshipData)
|
| | | |
| | | # 名次奖励
|
| | | paramList = [rank]
|
| | | PlayerCompensation.SendMailByKey("CrossChampionshipPKRank", [playerID], rankAwardItemList, paramList, crossMail=True)
|
| | |
| | |
|
| | | serverGroupIDList = [] # 全服统一逻辑
|
| | | PlayerControl.WorldNotifyCross(serverGroupIDList, 0, "ChampionshipOver")
|
| | | |
| | | # 通知新添加的膜拜
|
| | | GameWorship.SyncAddCrossWorship(worshipList)
|
| | | GameWorld.Log("===================================================================")
|
| | | return
|
| | |
|
| | |
| | | GameWorld.Log("挑战目标仙官玩家ID结果! zoneID=%s,mainOfficialID=%s,officialID=%s,fightPower=%s,tagFightPower=%s,tagPlayerID=%s,Ret=%s"
|
| | | % (zoneID, mainOfficialID, officialID, fightPower, tagFightPower, tagPlayerID, Ret), playerID)
|
| | |
|
| | | syncOfficialIDList = [officialID]
|
| | | playerName = PropData.get("Name", str(playerID))
|
| | | # 暂时只记录挑战胜利的
|
| | | if Ret == 1:
|
| | |
| | | officialObj.ResetPlayer()
|
| | | officialObj.playerID = playerID
|
| | |
|
| | | # 移除该玩家的其他仙官申请
|
| | | for offID in offZoneMgr.officialInfo.keys():
|
| | | offObj = offZoneMgr.GetOfficialObj(offID)
|
| | | if not offObj:
|
| | | continue
|
| | | if playerID in offObj.applyPlayerInfo:
|
| | | offObj.applyPlayerInfo.pop(playerID)
|
| | | syncOfficialIDList.append(offID)
|
| | | |
| | | # 邮件通知对方,官职被挑战了
|
| | | if offPlayerID:
|
| | | PlayerCompensation.SendMailByKey("CrossChampionshipOfficialBeChallenge", [offPlayerID], [], [playerName, officialID], crossMail=True)
|
| | |
|
| | | exData = {"exDataType":"OfficialChallenge", "playerID":playerID, "tagPlayerName":officialObj.playerName,
|
| | | "mainOfficialID":mainOfficialID, "officialID":officialID, "Ret":Ret}
|
| | | Send_CrossServerMsg_ChampionshipOfficial(zoneID, [officialID], exData=exData)
|
| | | Send_CrossServerMsg_ChampionshipOfficial(zoneID, syncOfficialIDList, exData=exData)
|
| | | return
|
| | |
|
| | | #// C0 23 跨服排位仙官挑战记录查询 #tagCGChampionshipOfficialChallengeQuery
|