|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | state = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_CrossChampionshipState) | 
|---|
|  |  |  | champMgr = CrossChampionship.GetChampionshipMgr() | 
|---|
|  |  |  | pkZoneIDList = champMgr.GetChampPKZoneIDList() | 
|---|
|  |  |  | #pkZoneIDList = champMgr.GetChampPKZoneIDList() | 
|---|
|  |  |  | if value1 == 0: | 
|---|
|  |  |  | if state in ShareDefine.CrossChampionshipStateList and state != ShareDefine.CrossChampionshipStateList[0]: | 
|---|
|  |  |  | GameWorld.DebugAnswerCross(playerID, serverGroupID, "重置数据需在非活动中或64强分组前") | 
|---|
|  |  |  | 
|---|
|  |  |  | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_CrossChampionshipID, 0) | 
|---|
|  |  |  | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_CrossChampionshipState, 0) | 
|---|
|  |  |  | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_CrossChampionshipStateError, 0) | 
|---|
|  |  |  | PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_CrossChampionshipErrorDo, 0) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | champMgr.ClearPKZone() | 
|---|
|  |  |  | if isResetOfficial: | 
|---|
|  |  |  | 
|---|
|  |  |  | zoneID = gmList[1] | 
|---|
|  |  |  | batPlayerCount = min(maxPlayerCount, gmList[2]) | 
|---|
|  |  |  | setPlayerIDList = gmList[3:] | 
|---|
|  |  |  | if zoneID not in pkZoneIDList: | 
|---|
|  |  |  | pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID) | 
|---|
|  |  |  | if not pkZoneMgr: | 
|---|
|  |  |  | GameWorld.DebugAnswerCross(playerID, serverGroupID, "不存在该分区!zoneID=%s" % zoneID) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | if len(setPlayerIDList) < batPlayerCount: | 
|---|
|  |  |  | # 不足的机器人补足 | 
|---|
|  |  |  | setPlayerIDList += range(1001, 1001 + (batPlayerCount - len(setPlayerIDList))) | 
|---|
|  |  |  | pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID) | 
|---|
|  |  |  | pkZoneMgr.playerDict = {} # 清空玩家,重新设置 | 
|---|
|  |  |  | CrossChampionship.Send_CrossServerMsg_ChampionshipPlayer(isSync=True) | 
|---|
|  |  |  | CrossChampionship.Send_CrossServerMsg_ChampionshipPlayer(isSync=True, clearPlayer=True) | 
|---|
|  |  |  | for pID in setPlayerIDList: | 
|---|
|  |  |  | batPlayer = CrossChampionship.ChampionshipBatPlayer() | 
|---|
|  |  |  | batPlayer.zoneID = zoneID | 
|---|
|  |  |  | 
|---|
|  |  |  | zoneID = gmList[1] | 
|---|
|  |  |  | groupPlayerIDList = gmList[2:] | 
|---|
|  |  |  | pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID) | 
|---|
|  |  |  | if not pkZoneMgr: | 
|---|
|  |  |  | GameWorld.DebugAnswerCross(playerID, serverGroupID, "不存在该分区!zoneID=%s" % zoneID) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | if not groupPlayerIDList: | 
|---|
|  |  |  | pkZoneMgr.battleInfo.pop(groupMark, None) | 
|---|
|  |  |  | CrossChampionship.DoCrossChampionshipGroupRand(groupMark) | 
|---|
|  |  |  | 
|---|
|  |  |  | GameWorld.Log("ID=%s,state=%s,stateError=%s,pkZoneIDList=%s" % (ID, state, stateError, pkZoneIDList)) | 
|---|
|  |  |  | for zoneID in pkZoneIDList: | 
|---|
|  |  |  | pkZoneMgr = champMgr.GetChampPKZoneMgr(zoneID) | 
|---|
|  |  |  | if not pkZoneMgr: | 
|---|
|  |  |  | continue | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #            self.guessInfo = {} # 竞猜信息 {竞猜类型:[ChampionshipGuess, ...], ...} | 
|---|
|  |  |  | #            self.superPlayerCountInfo = {} # {竞猜类型:{playerID:支持人数, ...}, ...} | 
|---|
|  |  |  | 
|---|
|  |  |  | for guessPlayerID, guessObjList in playerGuessDict.items(): | 
|---|
|  |  |  | GameWorld.Log("    guessPlayerID=%s,guessObjListLen=%s" % (guessPlayerID, len(guessObjList))) | 
|---|
|  |  |  | for guessObj in guessObjList: | 
|---|
|  |  |  | GameWorld.Log("        guessPlayerID=%s,tagPlayerID=%s,moneyTotal=%s,guessRank=%s" | 
|---|
|  |  |  | % (guessPlayerID, guessObj.tagPlayerID, guessObj.moneyTotal, guessObj.guessRank)) | 
|---|
|  |  |  | GameWorld.Log("        guessPlayerID=%s,tagPlayerID=%s,moneyTotal=%s,guessRank=%s,isClose=%s" | 
|---|
|  |  |  | % (guessPlayerID, guessObj.tagPlayerID, guessObj.moneyTotal, guessObj.guessRank, guessObj.isClose)) | 
|---|
|  |  |  | GameWorld.Log("    ===") | 
|---|
|  |  |  |  | 
|---|
|  |  |  | offZoneIDList = champMgr.GetChampOfficialZoneIDList() | 
|---|