| | |
| | |
|
| | | isEnd = True
|
| | | state = 0 # 默认关闭
|
| | | stateJoin = 0 # 可参与状态
|
| | | stateJoin = ShareDefine.ActStateJoin_None # 可参与状态,0-参与前;1-可参与;2-参与结束
|
| | | cfgID = ipyData.GetCfgID()
|
| | | groupName = ipyData.GetActGroupName()
|
| | | zoneID = ipyData.GetZoneID()
|
| | |
| | | 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)
|
| | | # 全服广播提示信息
|
| | |
| | | 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
|
| | |
| | | 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])
|
| | |
| | | % (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:
|