9415 【BT】【后端】古神战场(屏蔽无玩家在线的场次结算广播)
| | |
| | | def MapServer_CrossBattlefieldOver(msgList):
|
| | | ## 跨服战场地图结算
|
| | | overTime = int(time.time())
|
| | | hmNum = GetCrossBattlefieldState()
|
| | | fbPropertyID, zoneID, funcLineID, winnerFaction, superItemInfo, finalSuperItemPlayerID, finalSuperItemPlayerName, superItemPlayerIDList, scoreKingID, scoreKingName, battlePlayerList = msgList
|
| | | hmNum, fbPropertyID, zoneID, funcLineID, winnerFaction, superItemInfo, finalSuperItemPlayerID, finalSuperItemPlayerName, superItemPlayerIDList, scoreKingID, scoreKingName, battlePlayerList = msgList
|
| | | GameWorld.Log("跨服战场地图同步结果: hmNum=%s,zoneID=%s,funcLineID=%s,winnerFaction=%s,superItemInfo=%s,finalSuperItemPlayerID=%s,superItemPlayerIDList=%s,scoreKingID=%s,battlePlayerCount=%s"
|
| | | % (hmNum, zoneID, funcLineID, winnerFaction, superItemInfo, finalSuperItemPlayerID, superItemPlayerIDList, scoreKingID, len(battlePlayerList)), fbPropertyID)
|
| | |
|
| | |
| | | nextBattleTimeStr = "%02d:%02d" % (nextOpenHour, nextOpenMinute)
|
| | |
|
| | | # 本分区全服:XX阵营胜利,xxx为本场积分王,xxx获得了古神大奖XXX,下个场次预计将在XX点开放。
|
| | | if battlePlayerList:
|
| | | if finalSuperItemPlayerName:
|
| | | msgParamList = [winnerFaction, scoreKingName, finalSuperItemPlayerName, superItemID, superItemCount, nextBattleTimeStr]
|
| | | PlayerControl.WorldNotifyCross(serverGroupIDList, 0, "CrossBattlefieldOver", msgParamList)
|
| | | return
|
| | |
| | | class BattleWorld():
|
| | |
|
| | | def __init__(self):
|
| | | self.hmNum = 0
|
| | | self.callOpenPlayerInfo = {} # 本场次购买召集的玩家信息 {playerID:faction, ...}
|
| | | self.superItemInfo = [] # 大奖信息 [物品ID,个数,是否拍品]
|
| | | self.crystalFactionInfo = {} # 水晶资源所属阵营信息 {npcID:所属阵营, ...}
|
| | |
| | | for playerID, callTeam in callTeamInfo.items():
|
| | | worldObj.callOpenPlayerInfo[playerID] = callTeam["factionID"]
|
| | | GameWorld.Log("开启战场副本: hmNum=%s,callOpenPlayerInfo=%s" % (hmNum, worldObj.callOpenPlayerInfo), fbPropertyID)
|
| | | worldObj.hmNum = hmNum
|
| | |
|
| | | # 刷水晶
|
| | | crystalNPCIDPosDict = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldCrystal", 1, {})
|
| | |
| | | finalSuperItemPlayerName = superPlayerObj.name
|
| | | superItemPlayerIDList.append(finalSuperItemPlayerID)
|
| | |
|
| | | hmNum = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_CrossBattlefield)
|
| | | hmNum = worldObj.hmNum
|
| | | hmCallTeamInfo = PyGameData.g_crossBattlefieldCallTeamInfo.get(zoneID, {})
|
| | | callTeamInfo = hmCallTeamInfo.get(hmNum, {})
|
| | | allCallPlayerIDList = []
|
| | | for callTeam in callTeamInfo.values():
|
| | | allCallPlayerIDList.extend(callTeam["callPlayerIDList"])
|
| | | |
| | | GameWorld.Log("zoneID=%s,hmNum=%s,allCallPlayerIDList=%s" % (zoneID, hmNum, allCallPlayerIDList), fbPropertyID)
|
| | | |
| | | factionInfoList = []
|
| | | for faction in [ShareDefine.CampType_Justice, ShareDefine.CampType_Evil]:
|
| | | factionObj = GetBattleFactionObj(faction)
|
| | |
| | |
|
| | | # 同步GameServer 比赛结果
|
| | | superItemInfo = worldObj.superItemInfo
|
| | | msgInfo = str([fbPropertyID, zoneID, funcLineID, winnerFaction, superItemInfo, finalSuperItemPlayerID, finalSuperItemPlayerName, superItemPlayerIDList, scoreKingID, scoreKingName, battlePlayerList])
|
| | | msgInfo = str([hmNum, fbPropertyID, zoneID, funcLineID, winnerFaction, superItemInfo, finalSuperItemPlayerID, finalSuperItemPlayerName, superItemPlayerIDList, scoreKingID, scoreKingName, battlePlayerList])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "CrossBattlefieldOver", msgInfo, len(msgInfo))
|
| | |
|
| | | FBCommon.SetFBStep(FB_Step_LeaveTime, tick)
|