From 369e52f7a7b980c882ca322615b1995796fe9223 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 06 十一月 2018 21:38:13 +0800
Subject: [PATCH] 4595 【1.2】【后端】装备战力、评分优化(角色装备、神兽装备 )

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index c185620..a7fac3b 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -166,11 +166,17 @@
                 startDateStr = "%d-%d-%d" % (openServerDateTime.year, openServerDateTime.month, openServerDateTime.day)
                 endDateStr = "%d-%d-%d" % (endServerDateTime.year, endServerDateTime.month, endServerDateTime.day)
                 GameWorld.Log("        开服天转化为日期: %s ~ %s" % (startDateStr, endDateStr))
+            else:
+                if openServerDay <= customMaxServerDay:
+                    GameWorld.Log("        按日期开的在开服定制限制天内,不处理! cfgID=%s,%s ~ %s,openServerDay=%s" % (cfgID, startDateStr, endDateStr, openServerDay))
+                    continue
+                customMaxServerDateTime = curDateTime + datetime.timedelta(days=(customMaxServerDay-openServerDay))
+                curStartDateTime = datetime.datetime.strptime("%s %02d:%02d:%02d" % (startDateStr, customMaxServerDateTime.hour, customMaxServerDateTime.minute, 
+                                                                                     customMaxServerDateTime.second), ChConfig.TYPE_Time_Format)
+                if curStartDateTime <= customMaxServerDateTime:
+                    GameWorld.Log("        按日期开的开始日期在开服定制限制天内,不处理! cfgID=%s,curStartDateTime=%s,customMaxServerDateTime=%s" % (cfgID, curStartDateTime, customMaxServerDateTime))
+                    continue
                 
-            elif openServerDay <= customMaxServerDay:
-                GameWorld.Log("        按日期开的在开服定制限制天内,不处理! cfgID=%s,%s ~ %s,openServerDay=%s" % (cfgID, startDateStr, endDateStr, openServerDay))
-                continue
-            
             if hasattr(ipyData, "GetStartTimeList") and hasattr(ipyData, "GetEndTimeList"):
                 startHMStrList = ipyData.GetStartTimeList()
                 endHMStrList = ipyData.GetEndTimeList()
@@ -191,6 +197,9 @@
             if resetType == 1:
                 startDayDate = datetime.datetime.strptime("%s 05:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
                 endDayDate = datetime.datetime.strptime("%s 05:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) # 结束日期5点
+            elif resetType == 2:
+                startDayDate = datetime.datetime.strptime("%s 05:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)       
+                endDayDate = datetime.datetime.strptime("%s 00:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1) # 结束日期隔天0点
             else:
                 startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
                 endDayDate = datetime.datetime.strptime("%s 00:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1) # 结束日期隔天0点
@@ -445,7 +454,7 @@
             
             
                 
-        if state == 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
+        if state >= 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
             actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
             sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
         

--
Gitblit v1.8.0