From dc925938d150b82d50bcbdfd6b0b860be31ba53a Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 20 十月 2022 17:06:12 +0800
Subject: [PATCH] 9739 【越南】【BT7】【主干】运营活动下发时间优化(优化累计充值、消费返利活动开始日期与开服定制天交叉时下发开始日期为第8天)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index bfee180..166ec22 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -257,6 +257,7 @@
                           % (cfgID, actNum, startDateStr, endDateStr, openServerDay, isMixServer, mixServerDay, curDateTime, platformList, serverGroupIDList, serverGroupIDListExcept))
             
             actIDDateTimeSpec = None # 特殊指定的活动ID日期
+            startDateSync = None # 特殊同步前端显示用的开始日期,一般用于与开服前X天交叉的活动
             if actName in ShareDefine.MultiActNumOperationActNameList:
                 # 多活动分组编号的需要把所有配置的 actNum 都登记进来,以确保地图能正确进行逻辑
                 if actNum not in mapServerOperationActionDict[actName]:
@@ -331,6 +332,14 @@
                                                                            % (customMaxServerDateTime.year, customMaxServerDateTime.month, customMaxServerDateTime.day), 
                                                                            ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1)
                             GameWorld.Log("        开服天后可开启的非每日重置活动! 活动ID日期特殊设置为开服定制天结束后一天! cfgID=%s,actIDDateTimeSpec=%s" % (cfgID, actIDDateTimeSpec))
+                            
+                        # 特殊同步的开始日期,无视是否每日重置
+                        if actName in startDateInCustomCanOpenList:
+                            startDateSync = datetime.datetime.strptime("%d-%d-%d 00:00:00" 
+                                                                       % (customMaxServerDateTime.year, customMaxServerDateTime.month, customMaxServerDateTime.day), 
+                                                                       ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1)
+                            startDateSync = "%d-%d-%d" % (startDateSync.year, startDateSync.month, startDateSync.day)
+                            
                 else:
                     GameWorld.Log("        开服常规活动,配置时间格式不支持,不处理! cfgID=%s,startDateStr=%s,endDateStr=%s" % (cfgID, startDateStr, endDateStr))
                     continue
@@ -542,6 +551,10 @@
                     #活动每天的世界等级
                     activityInfoDict[ShareDefine.ActKey_WorldLVList] = GameWorldAverageLv.GetWorldLVListByTime(startDayDate, (endDayDate - startDayDate).days)
                     
+                if startDateSync:
+                    activityInfoDict[ShareDefine.ActKey_StartDateSync] = startDateSync
+                    GameWorld.Log("        startDateSync=%s" % (startDateSync))
+                    
                 dayIndex = (curDateTime - startDayDate).days
                 actIDDateTime = startDayDate
                 isDayRest = 0 if not hasattr(ipyData, "GetIsDayReset") else ipyData.GetIsDayReset()

--
Gitblit v1.8.0