| | |
| | | # 跨服不处理运营活动
|
| | | return
|
| | |
|
| | | isReload, OperationActionInfo = __GetOperationActionInfo()
|
| | | # 玩家登录的不触发重载活动,不然刚好在0点服务器处理OnDay之前登录的时候会有问题
|
| | | isReload, OperationActionInfo = __GetOperationActionInfo(needReload=False)
|
| | | if not OperationActionInfo:
|
| | | return
|
| | | operationActionDict = OperationActionInfo[OperationAction_TodayInfo]
|
| | |
|
| | | if isReload:
|
| | |
| | | % (actName, cfgID, recStartDateStr, recEndDateStr, recLimitWorldLV, recWorldLV))
|
| | | return actWorldLVLimitInfo
|
| | |
|
| | | def __GetOperationActionInfo(isRefreshState=True):
|
| | | def __GetOperationActionInfo(isRefreshState=True, needReload=True):
|
| | | # @return: isReload, OperationActionInfo
|
| | |
|
| | | key = "OperationActionInfo"
|
| | |
| | | #GameWorld.DebugLog("已经加载过本日运营活动处理信息!openServerDay=%s" % openServerDay)
|
| | | return False, OperationActionInfo
|
| | |
|
| | | if not needReload:
|
| | | return False, OperationActionInfo
|
| | | |
| | | # 因为后面的时间判断都是精确到分的,而处理此逻辑的时候可能不是0秒,所以这里的datetime取当前时间精确到分的
|
| | | curDateTimeStr = "%d-%d-%d %02d:%02d:00" % (serverTime.year, serverTime.month, serverTime.day, serverTime.hour, serverTime.minute)
|
| | | curDateTime = datetime.datetime.strptime(curDateTimeStr, ChConfig.TYPE_Time_Format)
|