5295 【BT5_1.100.1】【BT5】【主干】【gt_1.102.1】开服运营活动异常重置(修复玩家0点整服务器处理onday前登录导致的运营活动重置)
1个文件已修改
10 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -65,7 +65,10 @@
        # 跨服不处理运营活动
        return
    
    isReload, OperationActionInfo = __GetOperationActionInfo()
    # 玩家登录的不触发重载活动,不然刚好在0点服务器处理OnDay之前登录的时候会有问题
    isReload, OperationActionInfo = __GetOperationActionInfo(needReload=False)
    if not OperationActionInfo:
        return
    operationActionDict = OperationActionInfo[OperationAction_TodayInfo]
    
    if isReload:
@@ -189,7 +192,7 @@
                      % (actName, cfgID, recStartDateStr, recEndDateStr, recLimitWorldLV, recWorldLV))
    return actWorldLVLimitInfo
def __GetOperationActionInfo(isRefreshState=True):
def __GetOperationActionInfo(isRefreshState=True, needReload=True):
    # @return: isReload, OperationActionInfo
    
    key = "OperationActionInfo"
@@ -205,6 +208,9 @@
        #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)