hxp
2022-03-07 56ac916d2f9398a5f7509bebbdcfc941e8fb1d16
9415 【BT】【后端】古神战场(屏蔽无玩家在线的场次结算广播)
2个文件已修改
14 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -781,8 +781,7 @@
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)
    
@@ -876,7 +875,7 @@
        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
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
@@ -84,6 +84,7 @@
class BattleWorld():
    
    def __init__(self):
        self.hmNum = 0
        self.callOpenPlayerInfo = {} # 本场次购买召集的玩家信息 {playerID:faction, ...}
        self.superItemInfo = [] # 大奖信息 [物品ID,个数,是否拍品]
        self.crystalFactionInfo = {} # 水晶资源所属阵营信息 {npcID:所属阵营, ...}
@@ -506,6 +507,7 @@
    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, {})
@@ -1538,13 +1540,14 @@
        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)
@@ -1630,7 +1633,7 @@
            
    # 同步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)