From 4070cde64fce44caf818d8aefa985c2cdbdde0a2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 23 五月 2022 17:00:06 +0800
Subject: [PATCH] 9415 【BT】【后端】古神战场(修改战场结算信息同步内容)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
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 830fe33..2807769 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
@@ -1507,6 +1507,9 @@
FBCommon.NotifyCopyMapPlayerFBHelp(tick, DoFBHelp, 0)
#awardOnlineTimes = IpyGameDataPY.GetFuncCfg("CrossBattlefieldAward", 1) # 结算奖励需参与活动时长,秒钟
+ winnerOrderAwardDict = IpyGameDataPY.GetFuncEvalCfg("CrossBattlefieldAward", 2, {})
+ winnerOrderIntAwardDict = {int(k):v for k, v in winnerOrderAwardDict.items()}
+ syncRankCount = max(winnerOrderIntAwardDict) if winnerOrderIntAwardDict else 20
#gameFB = GameWorld.GetGameFB()
worldObj = GetBattleWorld()
@@ -1542,6 +1545,28 @@
for callTeam in callTeamInfo.values():
allCallPlayerIDList.extend(callTeam["callPlayerIDList"])
+ factionInfoList = []
+ for faction in [ShareDefine.CampType_Justice, ShareDefine.CampType_Evil]:
+ factionObj = GetBattleFactionObj(faction)
+ rankPlayerList = []
+ for battleObj in factionObj.battlePlayerSortList[:syncRankCount]:
+ rankPlayerList.append({"name":battleObj.name, "job":battleObj.job, "score":battleObj.score,
+ "killCount":battleObj.killCount, "crystalCollCnt":battleObj.crystalCollCnt})
+
+ callPlayerName = ""
+ for callPlayerID, callFaction in worldObj.callOpenPlayerInfo.items():
+ if callFaction == faction:
+ callBattleObj = GetBattlePlayerObj(callPlayerID)
+ callPlayerName = callBattleObj.name
+ break
+
+ factionInfoList.append({"faction":faction, "rankPlayerList":rankPlayerList, "callPlayerName":callPlayerName,
+ "superItemPlayerName":factionObj.superItemPlayerName})
+
+ costTime = int((tick - GameWorld.GetGameFB().GetFBStepTick()) / 1000.0)
+ overDict = {"winnerFaction":winnerFaction, "factionInfoList":factionInfoList, FBCommon.Over_costTime:costTime,
+ "finalSuperItemPlayerName":finalSuperItemPlayerName}
+
scoreKingID, scoreKingName = 0, "" # 本场积分王: 获胜方在线第一名积分
battlePlayerList = []
for faction in [ShareDefine.CampType_Justice, ShareDefine.CampType_Evil]:
@@ -1559,11 +1584,6 @@
scoreKingObj = GetBattlePlayerObj(scoreKingID)
scoreKingName = scoreKingObj.name
- rankPlayerList = []
- for battleObj in factionObj.battlePlayerSortList[:20]:
- rankPlayerList.append({"Name":battleObj.name, "Job":battleObj.job, "Score":battleObj.score})
-
- overDict = {"rankPlayerList":rankPlayerList, "faction":faction, "superItemPlayerName":finalSuperItemPlayerName, "scoreKingName":scoreKingName}
for rank, battleObj in enumerate(factionObj.battlePlayerSortList, 1):
playerID = battleObj.playerID
score = battleObj.score
@@ -1603,7 +1623,7 @@
player.Sync_TimeTick(IPY_GameWorld.tttLeaveMap, 0, leaveTime, True)
lineID = 0
- overDict.update({FBCommon.Over_rank:rank, "score":score, "highScoreToday":highScoreToday, "onlineTimes":onlineTimes})
+ overDict.update({FBCommon.Over_rank:rank, "score":score, "highScoreToday":highScoreToday, "onlineTimes":onlineTimes, "faction":faction})
FBCommon.NotifyFBOver(player, ChConfig.Def_FBMapID_CrossBattlefield, lineID, isWinner, overDict)
GameWorld.Log("本场最终结算积分王: scoreKingID=%s" % scoreKingID, fbPropertyID)
--
Gitblit v1.8.0