hxp
2024-07-04 eda1c4429db2e7a3b1b79eee0cba0fc7abec7290
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: