From ae75fd5ec02495ca1433809a5e0f01e749ad9fb5 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 28 八月 2019 17:01:34 +0800
Subject: [PATCH] 8199 【400】【主干】【后端】运营活动 和开(合)服活动时间交叉优化

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index ade467b..624c85e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -595,6 +595,15 @@
     @param dateInfo: 运营活动表配置的日期信息, 如果是纯数字代表开服天
     @param openServerDay: 当前开服天
     '''
+    if not dateInfo:
+        curDateTime = datetime.datetime.today()
+        return "%d-%d-%d" % (curDateTime.year, curDateTime.month, curDateTime.day)
+    if dateInfo.startswith("W"):
+        curDateTime = datetime.datetime.today()
+        curWeekday = curDateTime.weekday() + 1
+        actionWeekday = int(dateInfo[1:])
+        actionDateTime = curDateTime + datetime.timedelta(days=(actionWeekday-curWeekday))
+        return "%d-%d-%d" % (actionDateTime.year, actionDateTime.month, actionDateTime.day)
     if dateInfo.startswith("Mix"):
         diffDay = GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_MixServerDay) + 1
         actionServerDay = int(dateInfo[3:])

--
Gitblit v1.8.0