From 9aec2993fb9c257870afaa7f8fb4e8020b2c2ca2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 18 十二月 2020 11:14:57 +0800
Subject: [PATCH] 1111 【主干】【BT】 curBuff.GetSkill()、curEquip.GetAddSkill(0) 获取错误防范;

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

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 4c8cc92..e75d064 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -236,7 +236,7 @@
                     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 curServerOpenDateTime <= curStartDateTime <= customMaxServerDateTime:
+                    if customOpenServerDayState and curServerOpenDateTime <= curStartDateTime <= customMaxServerDateTime:
                         if actName not in startDateInCustomCanOpenList:
                             GameWorld.Log("        按日期/周开的开始日期在开服定制限制天内,不处理! cfgID=%s,curServerOpenDateTime=%s<=curStartDateTime=%s<=customMaxServerDateTime=%s" % (cfgID, curServerOpenDateTime, curStartDateTime, customMaxServerDateTime))
                             continue
@@ -249,7 +249,7 @@
                         customMaxServerDateTime = curDateTime + datetime.timedelta(days=(maxCustomServerDayMix-mixServerDay))
                         curStartDateTime = datetime.datetime.strptime("%s %02d:%02d:%02d" % (startDateStr, customMaxServerDateTime.hour, customMaxServerDateTime.minute, 
                                                                                              customMaxServerDateTime.second), ChConfig.TYPE_Time_Format)
-                        if mixStartServerDateTime <= curStartDateTime <= customMaxServerDateTime:
+                        if customMixServerDayState and mixStartServerDateTime <= curStartDateTime <= customMaxServerDateTime:
                             if actName not in startDateInCustomCanOpenList:
                                 GameWorld.Log("        按日期/周开的开始日期在合服定制限制天内,不处理! cfgID=%s,mixStartServerDateTime=%s<=curStartDateTime=%s<=customMaxServerDateTime=%s" % (cfgID, mixStartServerDateTime, curStartDateTime, customMaxServerDateTime))
                                 continue
@@ -390,12 +390,11 @@
                         activityInfoDict[ShareDefine.ActKey_WorldLVList] = GameWorldAverageLv.GetWorldLVListByTime(startDayDate, (endDayDate - startDayDate).days)
                     
                     if startDayDate <= curDateTime < endDayDate:
-                        dayIndex = 0
+                        dayIndex = (curDateTime - startDayDate).days
                         actIDDateTime = startDayDate
                         isDayRest = 0 if not hasattr(ipyData, "GetIsDayReset") else ipyData.GetIsDayReset()
                         # 按时段开的默认每天重置
                         if isDayRest or (startHMStrList and endHMStrList):
-                            dayIndex = (curDateTime - startDayDate).days
                             actIDDateTime += datetime.timedelta(days=dayIndex)
                         actID = int(time.mktime(actIDDateTime.timetuple())) # 默认取开始时间点的time值作为活动ID
                         activityInfoDict[ShareDefine.ActKey_DayIndex] = dayIndex

--
Gitblit v1.8.0