From ad9ca5656fe2b0af83ca3d3cd6b7cc5511047ba9 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 16 七月 2024 11:35:48 +0800
Subject: [PATCH] 9415 【主干】【港台】【越南】【砍树】【后端】古神战场(C107增加战场分区通知)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
index 7652dfe..b6912a2 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py
@@ -542,7 +542,7 @@
isEnd = True
state = 0 # 默认关闭
- stateJoin = 0 # 可参与状态
+ stateJoin = ShareDefine.ActStateJoin_None # 可参与状态,0-参与前;1-可参与;2-参与结束
cfgID = ipyData.GetCfgID()
groupName = ipyData.GetActGroupName()
zoneID = ipyData.GetZoneID()
@@ -565,10 +565,12 @@
for jIndex, joinStartDateTime in enumerate(joinStartTimeList):
endJoinDateTime = joinEndTimeList[jIndex]
if joinStartDateTime <= curDateTime < endJoinDateTime:
- stateJoin = state
+ stateJoin = ShareDefine.ActStateJoin_Start
break
+ elif curDateTime >= endJoinDateTime:
+ stateJoin = ShareDefine.ActStateJoin_End
else:
- stateJoin = state
+ stateJoin = ShareDefine.ActStateJoin_Start if state else ShareDefine.ActStateJoin_None
serverIDRangeList = actInfoDict.get(ShareDefine.ActKey_ServerIDRangeList)
# 全服广播提示信息
@@ -598,8 +600,8 @@
if not isReload and dbState == state and dbStateJoin == stateJoin and dbActID == actID and not forceReset:
#已经是这个状态了
continue
- GameWorld.Log("跨服运营活动状态: actName=%s,cfgID=%s,groupName=%s,zoneID=%s,dbState=%s -> state=%s,isEnd=%s, dbActID=%s -> actID=%s,forceReset=%s"
- % (actName, cfgID, groupName, zoneID, dbState, state, isEnd, dbActID, actID, forceReset))
+ GameWorld.Log("跨服运营活动状态: actName=%s,cfgID=%s,groupName=%s,zoneID=%s,dbState=%s -> state=%s,isEnd=%s, dbActID=%s -> actID=%s,forceReset=%s, dbStateJoin=%s -> stateJoin=%s"
+ % (actName, cfgID, groupName, zoneID, dbState, state, isEnd, dbActID, actID, forceReset, dbStateJoin, stateJoin))
# 更新状态
actInfoDict[ShareDefine.ActKey_State] = state
@@ -621,7 +623,7 @@
CrossActCTGBillboard.OnActIDChange(cfgID, dbTemplateID, state)
if actName == ShareDefine.CrossActName_BossTrial:
- PlayerActBossTrial.OnCrossActIDChange(cfgID, state)
+ PlayerActBossTrial.OnCrossActIDChange(cfgID, zoneID, ipyData, state)
else:
actChangeList.append([actName, ipyData, state, cfgID, groupName, zoneID, dbActID, actID, forceReset, dbTemplateID])
@@ -636,6 +638,17 @@
% (actName, cfgID, groupName, zoneID, dbState, state, actIDChange, dbTemplateID))
actStateChangeList.append([actName, ipyData, dbState, state, cfgID, groupName, zoneID, actIDChange, dbTemplateID])
+ # 仅活动有配置参与时间段的会触发
+ if actID and dbActID == actID and dbStateJoin != stateJoin:
+ GameWorld.Log(" 参与状态变更: dbStateJoin=%s,stateJoin=%s" % (dbStateJoin, stateJoin))
+ # 参与开始
+ if stateJoin == ShareDefine.ActStateJoin_Start:
+ pass
+ # 参与结束
+ elif stateJoin == ShareDefine.ActStateJoin_End:
+ if actName == ShareDefine.CrossActName_BossTrial:
+ PlayerActBossTrial.OnCrossActJoinEnd(cfgID, zoneID, ipyData)
+
GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_CrossActInfo % actName, crossActInfoDict[actName])
# 非活动中的处理完关闭后,最后删除
if not state and isEnd:
--
Gitblit v1.8.0