From 56ac916d2f9398a5f7509bebbdcfc941e8fb1d16 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 17:00:09 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(屏蔽无玩家在线的场次结算广播)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py                                          |    5 ++---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py |    9 ++++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
index 0996b7c..b98a550 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
+++ b/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
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
index 2807769..4317b3b 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py
+++ b/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)

--
Gitblit v1.8.0