hxp
2025-06-30 388823edfe6308cba6f76ca6dc4f20022c5cb2be
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -17,7 +17,6 @@
import datetime
import PyGameData
import CrossRealmPK
import CrossRealmMsg
import PlayerControl
import PyDataManager
@@ -25,6 +24,7 @@
import CrossRealmPlayer
import PlayerCompensation
import PlayerViewCache
import PlayerFuncTeam
import CrossBillboard
import IpyGameDataPY
import NetPackCommon
@@ -165,9 +165,26 @@
def GetHMNum(openHour, openMinute): return openHour * 100 + openMinute
def GetHMByNum(hmNum): return hmNum / 100, hmNum % 100
def GetCrossBattlefieldZoneIpyDataList(serverGroupID=0):
    ## 获取所有分区配置列表
    ipyDataList = CrossRealmPlayer.GetCrossZoneIpyDataListByServerGroupID(ChConfig.Def_FBMapID_CrossBattlefield, serverGroupID)
    if not ipyDataList:
        return []
    return ipyDataList
def GetCrossBattlefieldZoneIpyData(serverGroupID):
    ## 获取服务器所属分区配置
    return CrossRealmPlayer.GetCrossZoneIpyDataByServerGroupID(ChConfig.Def_FBMapID_CrossBattlefield, serverGroupID)
def GetCrossBattlefieldZoneID(serverGroupID):
    ## 获取服务器所属分区ID
    zoneIpyData = GetCrossBattlefieldZoneIpyData(serverGroupID)
    if not zoneIpyData:
        return 0
    return zoneIpyData.GetZoneID()
def OnPlayerLogin(curPlayer):
    serverGroupID = GameWorld.GetServerGroupID()
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    zoneIpyData = GetCrossBattlefieldZoneIpyData(GameWorld.GetServerGroupID())
    if not zoneIpyData:
        return
    zoneID = zoneIpyData.GetZoneID()
@@ -222,7 +239,7 @@
                awardItemList = []
                rankAwardItemList = GameWorld.GetOrderValueByDict(awardDict, rank, False, [])
                if rankAwardItemList:
                    awardItemList.append(rankAwardItemList)
                    awardItemList.extend(rankAwardItemList)
                paramList = [rank]
                if billboardType == ShareDefine.Def_CBT_BattlefieldWJoin and enterWeekMoneyItemID:
                    moneyBaseCount, multiValue = GameWorld.GetOrderValueByDict(enterWeekMoneyMultiIntDict, rank, False, [0, 0]) # 奖励货币倍值
@@ -236,6 +253,8 @@
                
            billboardObj.ClearData()
            
    # 清空队伍
    PlayerFuncTeam.DelTeamByFunc(ChConfig.Def_FBMapID_CrossBattlefield)
    return
def GetCrossBattlefieldState():
@@ -267,15 +286,7 @@
    '''
    
    GameWorld.Log("同步给子服跨服战场数据: syncServerGroupID=%s" % (serverGroupID))
    if serverGroupID:
        ipyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
        if not ipyData:
            return
        crossZoneList = [ipyData]
    else:
        crossZoneName = GameWorld.GetCrossZoneName()
        crossZoneList = IpyGameDataPY.GetIpyGameDataByCondition("CrossZonePK", {"CrossZoneName":crossZoneName}, True)
    crossZoneList = GetCrossBattlefieldZoneIpyDataList(serverGroupID)
    if not crossZoneList:
        return
    
@@ -321,6 +332,7 @@
def OnMapServerInitOK():
    # 通知地图服务器状态
    SyncMapServerCrossBattlefieldBuyInfo()
    SyncMapServerCrossBattlefieldSysCallBuyInfo()
    return
def SyncMapServerCrossBattlefieldBuyInfo():
@@ -335,6 +347,11 @@
                buyInfo[playerID] = {"callPlayerIDList":buyRec.callPlayerIDList, "factionID":buyRec.factionID}
            syncMapBuyInfo[zoneID][hmNum] = buyInfo
    GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossBattlefieldCallTeamInfo, syncMapBuyInfo)
    return
def SyncMapServerCrossBattlefieldSysCallBuyInfo():
    syncMapBuyInfo = PyGameData.g_crossBattlefieldSysCallBuyList
    GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossBattlefieldSysCallBuyInfo, syncMapBuyInfo)
    return
def OnMinuteProcess():
@@ -427,23 +444,15 @@
        PyGameData.g_crossDynamicLineInfo.pop(ChConfig.Def_FBMapID_CrossBattlefield, None)
        
        PyGameData.g_overPlayerIDList = []
        PyGameData.g_crossBattlefieldSysCallBuyList = []
        
        crossZoneName = GameWorld.GetCrossZoneName()
        crossZoneList = IpyGameDataPY.GetIpyGameDataByCondition("CrossZonePK", {"CrossZoneName":crossZoneName}, True)
        if not crossZoneList:
            crossZoneList = []
        hmNum = battlefieldState
        openHour, openMinute = GetHMByNum(hmNum)
        sysOpenHMList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldOpen", 1)
        crossZoneList = GetCrossBattlefieldZoneIpyDataList()
        for zoneIpyData in crossZoneList:
            zoneID = zoneIpyData.GetZoneID()
            seasonState = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_CrossPKZoneSeasonState % zoneID)
            if seasonState != 1:
                GameWorld.Log("    跨服PK赛季未开启中,跨服战场不开启! zoneID=%s" % zoneID)
                continue
            
            # 系统局确保每个等级段都有一场
            if [openHour, openMinute] in sysOpenHMList:
@@ -463,7 +472,12 @@
                    PlayerFB.OpenCrossDynamicLineBySys(zoneID, ChConfig.Def_FBMapID_CrossBattlefield, funcLineIDList, True)
                else:
                    GameWorld.Log("    无召集的场次不开分区战场! zoneID=%s" % (zoneID))
    # 关闭
    #if not battlefieldState and beforeState != battlefieldState:
    #    # 活动结束清空队伍
    #    PlayerFuncTeam.DelTeamByFunc(ChConfig.Def_FBMapID_CrossBattlefield)
    # 同步子服务器
    dataMsg = {"battlefieldState":battlefieldState}
    CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_BattlefieldState, dataMsg)
@@ -471,26 +485,18 @@
def __DoBattlefieldOpenNotify(openHour, openMinute, notifyOpenMinute):
    ''' 执行跨服战场开启广播
                    跨服PK赛季未开启状态下,跨服战场同步关闭,故也不广播
                    还要限制开服天开启
    '''
    
    gameWorld = GameWorld.GetGameWorld()
    sysOpenHMList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldOpen", 1)
    if [openHour, openMinute] in sysOpenHMList:
        
        crossZoneName = GameWorld.GetCrossZoneName()
        crossZoneList = IpyGameDataPY.GetIpyGameDataByCondition("CrossZonePK", {"CrossZoneName":crossZoneName}, True)
        crossZoneList = GetCrossBattlefieldZoneIpyDataList()
        if not crossZoneList:
            return
        
        for zoneIpyData in crossZoneList:
            zoneID = zoneIpyData.GetZoneID()
            seasonState = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_CrossPKZoneSeasonState % zoneID)
            if seasonState != 1:
                GameWorld.DebugLog("跨服PK赛季未开启中,跨服战场系统开启广播不处理!")
                continue
            
            serverGroupIDList = zoneIpyData.GetServerGroupIDList()
            PlayerControl.WorldNotifyCross(serverGroupIDList, 0, "CrossBattlefieldOpenSys", [notifyOpenMinute])
@@ -500,11 +506,6 @@
    curHMNum = GetHMNum(openHour, openMinute)
    
    for zoneID, buyHMInfo in PyGameData.g_crossBattlefieldBuyInfo.items():
        seasonState = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_CrossPKZoneSeasonState % zoneID)
        if seasonState != 1:
            GameWorld.DebugLog("跨服PK赛季未开启中,跨服战场玩家开启广播不处理!")
            continue
        
        zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByZoneID(ChConfig.Def_FBMapID_CrossBattlefield, zoneID)
        if not zoneIpyData:
@@ -523,17 +524,10 @@
    #  @return: None-当前未开放;
    #  @return: isCallBattle, openHour, openMinute  -  当前开放中的时间时分,可进入
    
    gameWorld = GameWorld.GetGameWorld()
    hmNum = GetCrossBattlefieldState()
    if not hmNum:
        GameWorld.Log("当前时间战场未开启!", playerID)
        PlayerControl.NotifyCodeCross(serverGroupID, playerID, "FBIsNotOpen")
        return
    seasonState = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_CrossPKZoneSeasonState % zoneID)
    if seasonState != 1:
        GameWorld.Log("赛季未开启!", playerID)
        PlayerControl.NotifyCodeCross(serverGroupID, playerID, "NotifySeasonOver")
        return
    
    if playerID in PyGameData.g_overPlayerIDList:
@@ -569,8 +563,9 @@
        if passSeconds > closeSeconds:
            GameWorld.DebugLog("迟到了! passSeconds=%s > %s" % (passSeconds, closeSeconds), playerID)
            isBelate = True
            #去除新队员进入不受时间限制设定
            for _, copyMapObj in PyGameData.g_crossDynamicLineCopyMapInfo.items():
                if copyMapObj.IsMustCopyMapPlayer(playerID):
                if copyMapObj.IsMustCopyMapPlayer(playerID, False):
                    isBelate = False
                    GameWorld.DebugLog("已进入的重复进入不限制时间!  playerID=%s" % playerID)
                    break
@@ -643,16 +638,10 @@
    if not GameWorld.IsCrossServer():
        return
    
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    zoneIpyData = GetCrossBattlefieldZoneIpyData(serverGroupID)
    if not zoneIpyData:
        return
    zoneID = zoneIpyData.GetZoneID()
    gameWorld = GameWorld.GetGameWorld()
    seasonState = gameWorld.GetDictByKey(ChConfig.Def_WorldKey_CrossPKZoneSeasonState % zoneID)
    if seasonState != 1:
        GameWorld.Log("跨服PK赛季未开启中,跨服战场也不能开启,无法购买!")
        return
    
    playerID = msgData["playerID"] # 角色ID
    playerName = msgData["playerName"] # 玩家名
@@ -666,8 +655,53 @@
    openMinute = msgData["openMinute"]
    faction = msgData["faction"]
    serverOnly = msgData.get("serverOnly", 0)
    face = msgData.get("face", 0)
    facePic = msgData.get("facePic", 0)
    
    hmNum = GetHMNum(openHour, openMinute)
    # 更新缓存
    curCache = PlayerViewCache.FindViewCache(playerID, True)
    if curCache:
        cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
        cacheDict["Name"] = playerName
        cacheDict["Job"] = job
        cacheDict["LV"] = playerLV
        cacheDict["RealmLV"] = realmLV
        cacheDict["FightPower"] = fightPower
    sysOpenHMList = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldOpen", 1)
    if [openHour, openMinute] in sysOpenHMList:
        if playerID in PyGameData.g_crossBattlefieldSysCallBuyList:
            GameWorld.Log("玩家已经购买过该系统场次! zoneID=%s,openHour=%s,openMinute=%s" % (zoneID, openHour, openMinute), playerID)
            return
        PyGameData.g_crossBattlefieldSysCallBuyList.append(playerID)
        buyTime = int(time.time())
        GameWorld.DebugLog("玩家购买系统召集场次! zoneID=%s,openHour=%s,openMinute=%s" % (zoneID, openHour, openMinute), playerID)
        # 上榜
        billboardCallCountLimit = IpyGameDataPY.GetFuncCfg("CrossBattlefieldBillboard", 1) # 周召集榜上榜至少次数
        groupValue1, dataID, name1, name2 = zoneID, playerID, playerName, ""
        type2, value1, value2 = job, realmLV, 0
        cmpValue = buyOpenCountWeek + 1
        if cmpValue >= billboardCallCountLimit:
            CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWCall, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue, value3=face, value4=facePic)
        # 通知子服
        serverGroupIDList = [serverGroupID]
        msgData.update({"opType":"SysCallBuy", "buyTime":buyTime})
        sendMsg = {"zoneID":zoneID, "SysCallBuyPlayerID":playerID, "opData":msgData}
        CrossRealmMsg.SendMsgToClientServer(ShareDefine.CrossServerMsg_BattlefieldBuy, sendMsg, serverGroupIDList)
        SyncMapServerCrossBattlefieldSysCallBuyInfo()
        buyPlayer = GameWorld.GetPlayerManager().FindPlayerByID(playerID)
        if buyPlayer:
            sendCMD = str(["SysCallBuy", PyGameData.g_crossBattlefieldSysCallBuyList])
            GameWorld.GetPlayerManager().MapServer_QueryPlayer(0, 0, buyPlayer.GetPlayerID(), buyPlayer.GetRealMapID(),
                                                               "CrossBattlefield", sendCMD, len(sendCMD), buyPlayer.GetRouteServerIndex())
        return
    
    if zoneID not in PyGameData.g_crossBattlefieldBuyInfo:
        PyGameData.g_crossBattlefieldBuyInfo[zoneID] = {}
@@ -699,16 +733,6 @@
    
    # ================ 可以购买,以下执行添加购买场次阵营逻辑  ================
    
    # 更新缓存
    curCache = PlayerViewCache.FindViewCache(playerID, True)
    if curCache:
        cacheDict = PlayerViewCache.GetCachePropDataDict(curCache)
        cacheDict["Name"] = playerName
        cacheDict["Job"] = job
        cacheDict["LV"] = playerLV
        cacheDict["RealmLV"] = realmLV
        cacheDict["FightPower"] = fightPower
    # 新增场次购买记录
    buyTime = int(time.time())
    buyRec = CrossBattlefieldBuy()
@@ -730,7 +754,7 @@
    type2, value1, value2 = job, realmLV, 0
    cmpValue = buyOpenCountWeek + 1
    if cmpValue >= billboardCallCountLimit:
        CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWCall, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue)
        CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWCall, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue, value3=face, value4=facePic)
        
    for otherBuyPlayerID, otherRec in buyPlayerInfo.items():
        if otherBuyPlayerID == playerID:
@@ -756,7 +780,7 @@
    tagPlayerID = msgData["tagPlayerID"]
    playerID = msgData["playerID"]
    
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    zoneIpyData = GetCrossBattlefieldZoneIpyData(serverGroupID)
    if not zoneIpyData:
        return
    zoneID = zoneIpyData.GetZoneID()
@@ -805,7 +829,7 @@
    tagPlayerID = msgData["tagPlayerID"]
    playerID = msgData["playerID"]
    
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    zoneIpyData = GetCrossBattlefieldZoneIpyData(serverGroupID)
    if not zoneIpyData:
        return
    zoneID = zoneIpyData.GetZoneID()
@@ -840,7 +864,7 @@
    serverOnly = msgData["serverOnly"]
    playerID = msgData["playerID"]
    
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    zoneIpyData = GetCrossBattlefieldZoneIpyData(serverGroupID)
    if not zoneIpyData:
        return
    zoneID = zoneIpyData.GetZoneID()
@@ -883,8 +907,8 @@
    syncPlayerDataInfo = {}
    winnerPlayerIDList, loserPlayerIDList = [], []
    for playerInfo in battlePlayerList:
        playerID, job, realmLV, name, \
            isWinner, faction, rank, score, highScoreToday, highScoreWeekTotal, enterCountWeek, \
        playerID, job, face, facePic, realmLV, name, \
            isWinner, faction, rank, score, highScoreToday, highScoreWeekTotal, enterCountWeek, teamID, \
            isCallOpen, isCalled, killCnt, ckillCntInfo, killBossCnt, killScoreKing, killGuardCnt, auraScore, superItemAwardCnt, \
            factionBuffCollCnt, personBuffCollCnt, crystalCollCnt, wallCollCnt \
                = playerInfo
@@ -913,19 +937,19 @@
        enterCountWeek += 1
        cmpValue = enterCountWeek
        if cmpValue >= billboardEnterCountLimit:
            CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWJoin, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue)
            CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWJoin, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue, value3=face, value4=facePic)
            
        # 更新周高分榜单
        if score > highScoreToday:
            highScoreWeekTotal += (score - highScoreToday)
            highScoreToday = score
            cmpValue = highScoreWeekTotal
            CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWScore, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue)
            CrossBillboard.UpdCrossBillboard(ShareDefine.Def_CBT_BattlefieldWScore, groupValue1, dataID, name1, name2, type2, value1, value2, cmpValue, value3=face, value4=facePic)
            
        GameWorld.Log("    战场阵营玩家: faction=%s,isWinner=%s,rank=%s,playerID=%s,score=%s,highScoreToday=%s,highScoreWeekTotal=%s,enterCountWeek=%s,isCallOpen=%s,isCalled=%s"
                      % (faction, isWinner, rank, playerID, score, highScoreToday, highScoreWeekTotal, enterCountWeek, isCallOpen, isCalled), fbPropertyID)
        GameWorld.Log("    战场阵营玩家: faction=%s,isWinner=%s,rank=%s,playerID=%s,score=%s,highScoreToday=%s,highScoreWeekTotal=%s,enterCountWeek=%s,teamID=%s,isCallOpen=%s,isCalled=%s"
                      % (faction, isWinner, rank, playerID, score, highScoreToday, highScoreWeekTotal, enterCountWeek, teamID, isCallOpen, isCalled), fbPropertyID)
        
        syncPlayerDataInfo[playerID] = [isWinner, faction, rank, score, highScoreToday, highScoreWeekTotal, enterCountWeek,
        syncPlayerDataInfo[playerID] = [isWinner, faction, rank, score, highScoreToday, highScoreWeekTotal, enterCountWeek, teamID,
                                        isCallOpen, isCalled, killCnt, ckillCntInfo, killBossCnt, killScoreKing, killGuardCnt, auraScore, superItemAwardCnt, 
                                        factionBuffCollCnt, personBuffCollCnt, crystalCollCnt, wallCollCnt]
        
@@ -942,8 +966,7 @@
        for superItemPlayerID in superItemPlayerIDList:
            PlayerCompensation.SendMailByKey("CrossBattlefieldSuperAward", [superItemPlayerID], [superItemInfo], crossMail=True)
        
    crossZoneName = GameWorld.GetCrossZoneName()
    zoneIpyData = IpyGameDataPY.GetIpyGameData("CrossZonePK", crossZoneName, zoneID)
    zoneIpyData = CrossRealmPlayer.GetCrossZoneIpyDataByZoneID(ChConfig.Def_FBMapID_CrossBattlefield, zoneID)
    serverGroupIDList = zoneIpyData.GetServerGroupIDList() if zoneIpyData else []
    
    # 通知子服更新参与玩家数据
@@ -975,18 +998,13 @@
    
    gameWorld = GameWorld.GetGameWorld()
    
    seasonState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
    beforeState = GetCrossBattlefieldState()
    beforeState = beforeState if (beforeState and seasonState == 1) else 0
    
    realBattlefieldState = battlefieldState if (battlefieldState and seasonState == 1) else 0
    GameWorld.DebugLog("收到跨服服务器同步的战场状态: battlefieldState=%s,seasonState=%s,beforeState=%s,realBattlefieldState=%s"
                       % (battlefieldState, seasonState, beforeState, realBattlefieldState))
    GameWorld.DebugLog("收到跨服服务器同步的战场状态: battlefieldState=%s,beforeState=%s" % (battlefieldState, beforeState))
    
    key = ShareDefine.Def_Notify_WorldKey_DailyActionState % ShareDefine.DailyActionID_CrossBattlefield
    gameWorld.SetDict(key, realBattlefieldState)
    GameWorld.SendMapServerMsgEx(key, realBattlefieldState)
    gameWorld.SetDict(key, battlefieldState)
    GameWorld.SendMapServerMsgEx(key, battlefieldState)
    return
def CrossServerMsg_BattlefieldOver(msgData):
@@ -996,10 +1014,9 @@
    overTime = msgData["overTime"]
    syncPlayerDataInfo = msgData["syncPlayerDataInfo"]
    
    gameWorld = GameWorld.GetGameWorld()
    pkZoneID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    if zoneID != pkZoneID:
        GameWorld.ErrLog("非本服所属分区的跨服战场购买信息! pkZoneID(%s) != zoneID(%s) %s" % (pkZoneID, zoneID, str(msgData)))
    curZoneID = GetCrossBattlefieldZoneID(GameWorld.GetServerGroupID())
    if zoneID != curZoneID:
        GameWorld.ErrLog("非本服所属分区的跨服战场购买信息! curZoneID(%s) != zoneID(%s) %s" % (curZoneID, zoneID, str(msgData)))
        return
    
    for playerID, playerData in syncPlayerDataInfo.items():
@@ -1013,15 +1030,26 @@
    GameWorld.DebugLog("收到跨服服务器同步的战场购买信息: %s" % msgData)
    
    zoneID = msgData["zoneID"]
    syncBuyHMInfo = msgData["syncBuyHMInfo"]
    opData = msgData.get("opData", {})
    
    gameWorld = GameWorld.GetGameWorld()
    pkZoneID = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKZoneID)
    if zoneID != pkZoneID:
        GameWorld.ErrLog("非本服所属分区的跨服战场购买信息! pkZoneID(%s) != zoneID(%s) %s" % (pkZoneID, zoneID, str(msgData)))
    curZoneID = GetCrossBattlefieldZoneID(GameWorld.GetServerGroupID())
    if zoneID != curZoneID:
        GameWorld.ErrLog("非本服所属分区的跨服战场购买信息! curZoneID(%s) != zoneID(%s) %s" % (curZoneID, zoneID, str(msgData)))
        return
    
    if "SysCallBuyPlayerID" in msgData:
        playerID = msgData["SysCallBuyPlayerID"]
        if PlayerControl.GetDBPlayerAccIDByID(playerID):
            openHour = opData["openHour"]
            openMinute = opData["openMinute"]
            faction = opData["faction"]
            buyTime = opData["buyTime"]
            todayBuyOpenCount = opData["todayBuyOpenCount"]
            msgInfo = ["BattlefieldBuy", [openHour, openMinute, faction, todayBuyOpenCount, buyTime]]
            CrossRealmPlayer.MapServer_QueryCrossPlayerResult(playerID, "CrossBattlefield", msgInfo)
        return
    syncBuyHMInfo = msgData["syncBuyHMInfo"]
    if not syncBuyHMInfo:
        PyGameData.g_crossBattlefieldBuyInfo.pop(zoneID, None)
        
@@ -1155,11 +1183,9 @@
                      % (openHour, openMinute, crossServerDateTime, endBuyDateTime), playerID)
        return
    
    serverGroupID = GameWorld.GetServerGroupID()
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    if not zoneIpyData:
    zoneID = GetCrossBattlefieldZoneID(GameWorld.GetServerGroupID())
    if not zoneID:
        return
    zoneID = zoneIpyData.GetZoneID()
    
    hmNum = GetHMNum(openHour, openMinute)
    buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)
@@ -1219,11 +1245,9 @@
                      % (openHour, openMinute, crossServerDateTime, endBuyDateTime), playerID)
        return
    
    serverGroupID = GameWorld.GetServerGroupID()
    zoneIpyData = CrossRealmPK.GetCrossPKServerGroupZone(serverGroupID)
    if not zoneIpyData:
    zoneID = GetCrossBattlefieldZoneID(GameWorld.GetServerGroupID())
    if not zoneID:
        return
    zoneID = zoneIpyData.GetZoneID()
    
    hmNum = GetHMNum(openHour, openMinute)
    buyPlayerInfo = GetBuyPlayerInfo(zoneID, hmNum)