From 17a6cf93c19a3a74bc38c06d85f7655c0266105a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 04 七月 2024 19:06:30 +0800 Subject: [PATCH] 10198 【香港】【越南】【主干】【砍树】【后端】BOSS凭证优化 --- 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 489ae9c..448293c 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossActionControl.py @@ -541,7 +541,7 @@ isEnd = True state = 0 # 默认关闭 - stateJoin = 0 # 可参与状态 + stateJoin = ShareDefine.ActStateJoin_None # 可参与状态,0-参与前;1-可参与;2-参与结束 cfgID = ipyData.GetCfgID() groupName = ipyData.GetActGroupName() zoneID = ipyData.GetZoneID() @@ -564,10 +564,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) # 全服广播提示信息 @@ -597,8 +599,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 @@ -620,7 +622,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]) @@ -635,6 +637,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