From d00dc755846c377bd8decbc0f13af20015e99c53 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 19 八月 2024 16:31:32 +0800
Subject: [PATCH] 10229 【越南】【主干】【港台】【砍树】古神战场修改(去除队员在开始x分钟限制进入后还能进入的设定,x分钟前进入的玩家不受限制,未结算前可任意进出;优化分流线路结算状态下新请求的队员不会再分流到同一线路,会新开线路;)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py | 3 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/GameLogic_CrossBattlefield.py | 3 +++
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py | 16 ++++++++++++----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
index 5ed2757..c2d5655 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossBattlefield.py
@@ -561,8 +561,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
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
index 3ff9a9a..3298d23 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFB.py
@@ -97,10 +97,14 @@
return totalPlayerCount
- def IsMustCopyMapPlayer(self, playerID):
+ def IsMustCopyMapPlayer(self, playerID, checkTeam=True):
## 是否必定在此分线的玩家, 在请求队列里 或 曾经进入到该分线的,都强制认为属于该分线的玩家
if playerID in self.waitPlayerDict or playerID in self.enterPlayerIDList:
return True
+ if self.openState != IPY_PlayerDefine.fbosOpen:
+ return False
+ if not checkTeam:
+ return False
# 队友强制在一起
funcTeamMgr = PyDataManager.GetDBPyFuncTeamManager()
teamID = funcTeamMgr.GetPlayerTeamID(playerID, self.funcMapID)
@@ -273,7 +277,7 @@
realMapID, copyMapID, openState = tagCopyMapObj.realMapID, tagCopyMapObj.copyMapID, tagCopyMapObj.openState
- if openState == IPY_PlayerDefine.fbosWaitForClose:
+ if openState >= IPY_PlayerDefine.fbosWaitForClose:
PlayerControl.NotifyCodeCross(serverGroupID, playerID, "CrossFBClose")
GameWorld.ErrLog("分流的副本线路关闭中! mapID=%s,funcLineID=%s,zoneID=%s,realMapID=%s,copyMapID=%s,openState=%s"
% (mapID, funcLineID, zoneID, realMapID, copyMapID, openState), playerID)
@@ -360,7 +364,7 @@
copyMapObj = PyGameData.g_crossDynamicLineCopyMapInfo[key]
openState = copyMapObj.openState
- if openState == IPY_PlayerDefine.fbosWaitForClose:
+ if openState >= IPY_PlayerDefine.fbosWaitForClose:
# 没有限制分流人数的情况,代表都在同一场,这种情况下当副本已经在关闭的状态下,则代表已经结束了,不可再进入
if not shuntPlayerMax:
PlayerControl.NotifyCodeCross(serverGroupID, playerID, "CrossFBClose")
@@ -546,7 +550,11 @@
OnCrossDynamicLineClose(realMapID, copyMapID)
elif state == IPY_PlayerDefine.fbosOpen:
OnCrossDynamicLineOpen(mapID, realMapID, copyMapID)
-
+ else:
+ key = (realMapID, copyMapID)
+ if key in PyGameData.g_crossDynamicLineCopyMapInfo:
+ copyMapObj = PyGameData.g_crossDynamicLineCopyMapInfo[key]
+ copyMapObj.openState = state
return
def OnCrossDynamicLineOpen(mapID, realMapID, copyMapID):
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 d901547..7933bf5 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
@@ -1816,6 +1816,9 @@
DataRecordPack.SendEventPack("CrossBattlefieldOver", drDict)
FBCommon.SetFBStep(FB_Step_LeaveTime, tick)
+
+ # 同步该分线结算了,防止再分流到该分线
+ GameWorldProcess.GameServer_DynamicLineMapStateChange(gameWorld, 3)
return
##是否可以夺旗
--
Gitblit v1.8.0