From a98e28b6487ea5634459d3e425124de6df143b2d Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 19 三月 2025 14:21:01 +0800
Subject: [PATCH] 10263 【英文】【BT】【GM】后端支持NPC仿真实玩家战斗和快速战斗(触发被动死循环防范修改;)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
index 9ac8890..c3e7baa 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -24,6 +24,7 @@
import CrossRealmPlayer
import PlayerCompensation
import PlayerViewCache
+import PlayerFuncTeam
import CrossBillboard
import IpyGameDataPY
import NetPackCommon
@@ -252,6 +253,8 @@
billboardObj.ClearData()
+ # 清空队伍
+ PlayerFuncTeam.DelTeamByFunc(ChConfig.Def_FBMapID_CrossBattlefield)
return
def GetCrossBattlefieldState():
@@ -469,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)
@@ -555,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
@@ -646,6 +655,8 @@
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)
@@ -675,7 +686,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)
# 通知子服
serverGroupIDList = [serverGroupID]
@@ -743,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:
@@ -896,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
@@ -926,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]
--
Gitblit v1.8.0