| | |
| | | import PlayerControl
|
| | | import PyDataManager
|
| | | import NetPackCommon
|
| | | import GameXiangong
|
| | | import GameWorship
|
| | | import PyGameData
|
| | | import ChConfig
|
| | |
| | | self.lv = 0
|
| | | self.fightPower = 0
|
| | | self.realmLV = 0
|
| | | self.face = 0
|
| | | self.facePic = 0
|
| | | return
|
| | |
|
| | | def GetString(self):
|
| | |
| | | playerShortInfo["LV"] = cacheDict.get("LV", 1)
|
| | | playerShortInfo["FightPower"] = cacheDict.get("FightPower", 0)
|
| | | playerShortInfo["RealmLV"] = cacheDict.get("RealmLV", 0)
|
| | | playerShortInfo["Face"] = cacheDict.get("Face", 0)
|
| | | playerShortInfo["FacePic"] = cacheDict.get("FacePic", 0)
|
| | | self.applyPlayerInfo[applyPlayerID] = playerShortInfo
|
| | | return {"zoneID":self.zoneID, "officialID":self.officialID, "lastDismissJuniorTime":self.lastDismissJuniorTime,
|
| | | "accID":self.accID, "playerID":self.playerID, "playerName":self.playerName,
|
| | | "accID":self.accID, "playerID":self.playerID, "playerName":self.playerName, "face":self.face, "facePic":self.facePic,
|
| | | "job":self.job, "lv":self.lv, "fightPower":self.fightPower, "realmLV":self.realmLV, "rank":self.rank,
|
| | | "worshipCount":self.worshipCount, "applyPlayerInfo":self.applyPlayerInfo, "challengeList":self.challengeList,
|
| | | "worshipDouble":self.worshipDouble
|
| | |
| | | self.lv = 0
|
| | | self.fightPower = 0
|
| | | self.realmLV = 0
|
| | | self.face = 0
|
| | | self.facePic = 0
|
| | | return
|
| | |
|
| | | def GetString(self):
|
| | | return {"zoneID":self.zoneID, "accID":self.accID, "playerID":self.playerID, "playerName":self.playerName,
|
| | | "job":self.job, "lv":self.lv, "fightPower":self.fightPower, "realmLV":self.realmLV}
|
| | | "job":self.job, "lv":self.lv, "fightPower":self.fightPower, "realmLV":self.realmLV, "face":self.face, "facePic":self.facePic}
|
| | |
|
| | | def SetAttr(self, attrDict):
|
| | | for k, v in attrDict.items():
|
| | |
| | | obj.lv = cacheDict.get("LV", obj.lv)
|
| | | obj.fightPower = cacheDict.get("FightPower", obj.fightPower)
|
| | | obj.realmLV = cacheDict.get("RealmLV", obj.realmLV)
|
| | | obj.face = cacheDict.get("Face", obj.face)
|
| | | obj.facePic = cacheDict.get("FacePic", obj.facePic)
|
| | |
|
| | | return
|
| | |
|
| | |
| | | pkZoneIDList = champMgr.GetChampPKZoneIDList()
|
| | | GameWorld.Log("pkZoneIDList=%s" % pkZoneIDList)
|
| | |
|
| | | worshipList = []
|
| | | syncNewWorshipList = []
|
| | | syncNewXiangongDict = {}
|
| | | crossZoneName = GameWorld.GetCrossZoneName()
|
| | | for zoneID in pkZoneIDList:
|
| | | GameWorld.Log("=== 结算排位分区: zoneID=%s ===" % zoneID, zoneID)
|
| | | zoneIpyData = IpyGameDataPY.GetIpyGameData("CrossZonePK", crossZoneName, zoneID)
|
| | | serverIDRangeList = zoneIpyData.GetServerGroupIDList() if zoneIpyData else []
|
| | | |
| | | finalPlayerIDList = []
|
| | | pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID)
|
| | | if not pkZoneMgr:
|
| | |
| | | rankIpyData = IpyGameDataPY.GetIpyGameData("ChampionshipRank", rank)
|
| | | officialID = rankIpyData.GetMainOfficialID() if rankIpyData else 0
|
| | | rankAwardItemList = rankIpyData.GetRankAwardItemList() if rankIpyData else []
|
| | | GameWorld.Log(" 最终排名: zoneID=%s,rank=%s,playerID=%s,officialID=%s,rankAwardItemList=%s,accID=%s,fightPower=%s" |
| | | % (zoneID, rank, playerID, officialID, rankAwardItemList, accID, fightPower), zoneID)
|
| | | xiangongID = rankIpyData.GetXiangongID() if rankIpyData else 0
|
| | | GameWorld.Log(" 最终排名: zoneID=%s,rank=%s,playerID=%s,officialID=%s,xiangongID=%s,rankAwardItemList=%s,accID=%s,fightPower=%s" |
| | | % (zoneID, rank, playerID, officialID, xiangongID, rankAwardItemList, accID, fightPower), zoneID)
|
| | |
|
| | | if officialID:
|
| | | offObj = ChampionshipOfficial()
|
| | |
| | |
|
| | | 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)
|
| | | |
| | | GameXiangong.AddXiangongPlayer(xiangongID, playerID, serverIDRangeList, rank, syncNewXiangongDict)
|
| | | GameWorship.AddWorshipPlayer(worshipType, rank, playerID, serverIDRangeList, syncNewWorshipList)
|
| | |
|
| | | # 处理4强竞猜发奖励
|
| | | guessType = 4
|
| | |
| | | PlayerControl.WorldNotifyCross(serverGroupIDList, 0, "ChampionshipOver")
|
| | |
|
| | | # 通知新添加的膜拜
|
| | | GameWorship.SyncAddCrossWorship(worshipList)
|
| | | GameWorship.SendNewWorshipPlayer(syncNewWorshipList)
|
| | | GameXiangong.SendNewXiangongPlayerToClientServer(syncNewXiangongDict)
|
| | | GameWorld.Log("===================================================================")
|
| | | return
|
| | |
|
| | |
| | | playerPack.FightPower = batPlayer.fightPower % ShareDefine.Def_PerPointValue
|
| | | playerPack.FightPowerEx = batPlayer.fightPower / ShareDefine.Def_PerPointValue
|
| | | playerPack.RealmLV = batPlayer.realmLV
|
| | | playerPack.Face = batPlayer.face
|
| | | playerPack.FacePic = batPlayer.facePic
|
| | | clientPack.PlayerList.append(playerPack)
|
| | | clientPack.PlayerCount = len(clientPack.PlayerList)
|
| | |
|
| | |
| | | offPlayer.FightPower = offObj.fightPower % ShareDefine.Def_PerPointValue
|
| | | offPlayer.FightPowerEx = offObj.fightPower / ShareDefine.Def_PerPointValue
|
| | | offPlayer.RealmLV = offObj.realmLV
|
| | | offPlayer.Face = offObj.face
|
| | | offPlayer.FacePic = offObj.facePic
|
| | |
|
| | | offPack = ChPyNetSendPack.tagGCChampionshipOfficial()
|
| | | offPack.OfficialID = officialID
|
| | |
| | | applyPlayer.FightPower = fightPower % ShareDefine.Def_PerPointValue
|
| | | applyPlayer.FightPowerEx = fightPower / ShareDefine.Def_PerPointValue
|
| | | applyPlayer.RealmLV = playerInfo.get("RealmLV", 1)
|
| | | applyPlayer.Face = playerInfo.get("Face", 0)
|
| | | applyPlayer.FacePic = playerInfo.get("FacePic", 0)
|
| | |
|
| | | offPack.ApplyPlayerList.append(applyPlayer)
|
| | | offPack.ApplyPlayerCount = len(offPack.ApplyPlayerList)
|