From bf35c00e4280ff13b76fa91a1d784d571ba0a52f Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 04 一月 2019 20:02:24 +0800
Subject: [PATCH] 1 跑环活跃度增加日志输出

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

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index 7680c92..b3b541d 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -1603,9 +1603,9 @@
     '''
     checkDate = ChangeTimeNumToDatetime(checkTime)
     curDate = GetCurrentTime()
-    if checkDate > curDate:
-        #DebugLog("检查时间比当前时间大")
-        return False
+    #if checkDate > curDate:
+    #    #DebugLog("检查时间比当前时间大")
+    #    return False
     
     Def_OnEventHour = ShareDefine.Def_OnEventHour
     chkYear, chkMonth, chkDay, chkHour = checkDate.year, checkDate.month, checkDate.day, checkDate.hour
@@ -1622,6 +1622,7 @@
     checkDateEx = datetime.datetime(chkYear, chkMonth, chkDay, 0, 0, 0)
     curDateEx = datetime.datetime(curYear, curMonth, curDay, 0, 0, 0)
     diffDays = (curDateEx - checkDateEx).days
+    ## 当前时间比检查的时间大1天
     if diffDays == 1:
         if chkHour < Def_OnEventHour:
             #DebugLog("日期相差天数1, 不同天! chkHour(%s) < %s" % (chkHour, Def_OnEventHour))
@@ -1634,6 +1635,19 @@
         #DebugLog("日期相差天数1, 同天! curHour(%s) < %s <= chkHour(%s)" % (curHour, Def_OnEventHour, chkHour))
         return True
     
+    ## 当前时间比检查的时间小1天
+    elif diffDays == -1:
+        if curHour < Def_OnEventHour:
+            #DebugLog("日期相差天数-1, 不同天! curHour(%s) < %s" % (curHour, Def_OnEventHour))
+            return False
+        
+        if chkHour >= Def_OnEventHour:
+            #DebugLog("日期相差天数-1, 不同天! chkHour(%s) >= %s" % (chkHour, Def_OnEventHour))
+            return False
+        
+        #DebugLog("日期相差天数-1, 同天! chkHour(%s) < %s <= curHour(%s)" % (chkHour, Def_OnEventHour, curHour))
+        return True
+    
     #DebugLog("日期相差天数大于1,不同一天!")
     return False
 

--
Gitblit v1.8.0