From 97a175bb2d85221c1fd7ca94388493c87f920b7c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 14 二月 2019 11:28:07 +0800
Subject: [PATCH] 6211 【后端】【1.6】合服任务单(合服日常、限时副本定制支持)

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py |  167 +++++++++++++++++++++++---------
 ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py                         |   76 +++++++++++++++
 ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py                  |    3 
 PySysDB/PySysDBG.h                                                                      |   28 +++++
 4 files changed, 224 insertions(+), 50 deletions(-)

diff --git a/PySysDB/PySysDBG.h b/PySysDB/PySysDBG.h
index 92bddf6..04b5240 100644
--- a/PySysDB/PySysDBG.h
+++ b/PySysDB/PySysDBG.h
@@ -62,6 +62,18 @@
 	dict		NotifyInfo;	//广播提示信息
 };
 
+//日常活动表定制表合服
+
+struct tagDailyActionCustomMix
+{
+	DWORD		ID;	//ID
+	DWORD		_MixServerDay;	//合服第几天
+	BYTE		DailyID;	//日常活动ID
+	list		OpenTimeList;	//开启时间列表
+	DWORD		Duration;	//持续时间, 0为不限制
+	dict		NotifyInfo;	//广播提示信息
+};
+
 //副本状态时间表
 
 struct tagFBStateTime
@@ -95,6 +107,22 @@
 	dict		NotifyInfoDict;	//广播提示信息
 };
 
+//副本状态时间定制表合服
+
+struct tagFBStateTimeCustomMix
+{
+	DWORD		ID;		//ID
+	DWORD		_MixServerDay;	//合服第几天
+	DWORD		DataMapID;	//所属的玩法数据地图ID
+	BYTE		StartHour;	//开始时
+	BYTE		StartMinute;	//开始分
+	BYTE		EndHour;	//结束时
+	BYTE		EndMinute;	//结束分
+	BYTE		CanEnter;	//是否可进入副本
+	BYTE		StateValue;	//状态值
+	dict		NotifyInfoDict;	//广播提示信息
+};
+
 //副本总表
 
 struct tagFBFunc
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
index 8655e0b..e4427d0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMCommon.py
@@ -461,7 +461,8 @@
                              ChConfig.TYPE_ActionOpenAndCloseByDayCountGoOn]
     for acKey in actionControlTickList:
         worldMgr.SetTickByType(acKey, 0)
-    
+        
+    GameWorld.GetGameWorld().SetDict(ChConfig.Def_WorldKey_ProcessMinute, 0)
     #处理重开服务器后, 活动继续开启逻辑根据天数
     #GameWorldActionControl.Dispose_Action_GoOn_ByDay(tick)
     return
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 5e25d64..5c55fe9 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -584,9 +584,12 @@
     # 获取本日待处理的日常活动信息
     key = "TodayDailyActionInfo"
     openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
+    isMixServer = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer)
+    mixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay) + 1
+    loadSign = [openServerDay, isMixServer, mixServerDay]
     TodayDailyActionInfo = IpyGameDataPY.GetConfigEx(key)
-    if TodayDailyActionInfo and TodayDailyActionInfo[0] == openServerDay:
-        #GameWorld.DebugLog("已经加载过本日日常活动处理信息!openServerDay=%s" % openServerDay)
+    if TodayDailyActionInfo and TodayDailyActionInfo[0] == loadSign:
+        #GameWorld.DebugLog("已经加载过本日日常活动处理信息!loadSign=%s" % loadSign)
         return TodayDailyActionInfo[1]
     
     todayActionInfo = []
@@ -598,16 +601,20 @@
     
     openServerWeekday = GameWorldProcess.GetOpenServerWeekday() # 服务器开服时是星期几
     curMaxCustomServerDay = IpyGameDataPY.GetFuncCfg("OperationAction", 1) - openServerWeekday + 1 # 最大有效定制开服天
+    maxCustomServerDayMix = IpyGameDataPY.GetFuncCfg("MixServer", 1)
     GameWorld.Log("===== 加载今天日常活动信息 =====")
-    GameWorld.Log("    开服是星期%s, 开服第%s天, 当前星期%s" % (openServerWeekday, openServerDay, weekDay))
-    GameWorld.Log("    最大有效定制开服天: %s" % (curMaxCustomServerDay))
+    GameWorld.Log("开服是星期%s, 开服第%s天, 当前星期%s" % (openServerWeekday, openServerDay, weekDay))
+    GameWorld.Log("最大有效定制开服天: %s" % (curMaxCustomServerDay))
+    GameWorld.Log("是否合服: %s, 合服天: %s, 最大定制合服天: %s" % (isMixServer, mixServerDay, maxCustomServerDayMix))
     
     customDailyIDList = []
     dailyTimeInfoList = []
     # 暂固定前2周定制有效, 为方便GM命令测试,这里用开服天做判断,不用开服周
     if openServerDay <= curMaxCustomServerDay:
         customIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("DailyActionCustom", openServerWeekday)
-        GameWorld.Log("    本周定制的日常活动条数: %s" % len(customIpyDataList))
+        if not customIpyDataList:
+            customIpyDataList = []
+        GameWorld.Log("    本周定制的开服日常活动条数: %s" % len(customIpyDataList))
         customIDList = []
         todayCustomIDList = []
         for customIpyData in customIpyDataList:
@@ -618,12 +625,26 @@
             customIDList.append(dataID)
             if customIpyData.GetOpenServerDay() == openServerDay:
                 todayCustomIDList.append(dataID)
-                isCustom = True
-                dailyTimeInfoList.append([isCustom, customIpyData.GetOpenTimeList(), customIpyData])
-                GameWorld.Log("    增加本日日常活动信息: isCustom=%s,dailyID=%s,dataID=%s" % (isCustom, dailyID, dataID))
-        GameWorld.Log("    本周定制的日常配置表ID列表: %s" % (customIDList))
-        GameWorld.Log("    本周定制的日常活动ID列表: %s" % (customDailyIDList))
-        GameWorld.Log("    今天定制的日常表ID列表=%s" % (todayCustomIDList))
+                customType = 1
+                dailyTimeInfoList.append([customType, customIpyData.GetOpenTimeList(), customIpyData])
+                GameWorld.Log("    增加本日开服日常活动信息: customType=%s,dailyID=%s,dataID=%s" % (customType, dailyID, dataID))
+        GameWorld.Log("    本周定制的开服日常配置表ID列表: %s" % (customIDList))
+        GameWorld.Log("    本周定制的开服日常活动ID列表: %s" % (customDailyIDList))
+        GameWorld.Log("    今天定制的开服日常表ID列表=%s" % (todayCustomIDList))
+    elif isMixServer and mixServerDay <= maxCustomServerDayMix:
+        customIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("DailyActionCustomMix", mixServerDay)
+        if not customIpyDataList:
+            customIpyDataList = []
+        GameWorld.Log("    今天定制的合服日常活动条数: %s" % len(customIpyDataList))
+        for customIpyData in customIpyDataList:
+            dataID = customIpyData.GetID()
+            dailyID = customIpyData.GetDailyID()
+            if dailyID not in customDailyIDList:
+                customDailyIDList.append(dailyID)
+            customType = 2
+            dailyTimeInfoList.append([customType, customIpyData.GetOpenTimeList(), customIpyData])
+            GameWorld.Log("    增加本日合服日常活动信息: customType=%s,dailyID=%s,dataID=%s" % (customType, dailyID, dataID))
+        GameWorld.Log("    今天定制的合服日常活动ID列表: %s" % (customDailyIDList))
     else:
         GameWorld.Log("    超过最大定制开服天,不定制,走常规日常配置!")
     
@@ -651,10 +672,11 @@
             GameWorld.Log("    不是日常活动开启星期: dailyID=%s,openWeekLimit=%s" % (dailyID, openTimeDict.keys()))
             continue
         openTimeList = openTimeDict["0"] if "0" in openTimeDict else openTimeDict[weekDay]
-        dailyTimeInfoList.append([False, openTimeList, dailyIpyData])
+        customType = 0
+        dailyTimeInfoList.append([customType, openTimeList, dailyIpyData])
         
     GameWorld.Log("    -----------------------")
-    for isCustom, openTimeList, ipyData in dailyTimeInfoList:
+    for customType, openTimeList, ipyData in dailyTimeInfoList:
         dailyID = ipyData.GetDailyID()
         notifyInfoDict = ipyData.GetNotifyInfo()
         
@@ -689,11 +711,11 @@
                 notifyDict[(notifyDateTime.hour, notifyDateTime.minute)] = notifyInfo
                 
         todayActionInfo.append([dailyID, openList, overList, goonStateDict, notifyDict])
-        GameWorld.Log("    增加本日日常活动信息: isCustom=%s,dailyID=%s,openList=%s,overList=%s,goonStateDict=%s,notifyDict=%s" 
-                      % (int(isCustom), dailyID, openList, overList, goonStateDict, notifyDict))
+        GameWorld.Log("    增加本日限时日常活动信息: customType=%s,dailyID=%s,openList=%s,overList=%s,goonStateDict=%s,notifyDict=%s" 
+                      % (customType, dailyID, openList, overList, goonStateDict, notifyDict))
         
-    TodayDailyActionInfo = IpyGameDataPY.SetConfigEx(key, [openServerDay, todayActionInfo])
-    GameWorld.Log("本日日常活动信息加载完毕!")
+    TodayDailyActionInfo = IpyGameDataPY.SetConfigEx(key, [loadSign, todayActionInfo])
+    GameWorld.Log("本日日常活动信息加载完毕! loadSign=%s" % loadSign)
     GameWorld.Log("=============================================================")
     return TodayDailyActionInfo[1]
 
@@ -803,7 +825,7 @@
                     FBStateEndTimeNotResetIDList.append(dataID)
         FBStateEndTimeNotResetIDList.sort()
         
-        # 加载定制表
+        # 加载开服定制表
         customStateTimeDict = {}
         for i in xrange(ipyDataMgr.GetFBStateTimeCustomCount()):
             customIpyData = ipyDataMgr.GetFBStateTimeCustomByIndex(i)
@@ -826,18 +848,45 @@
                     FBStateEndTimeNotResetCustomIDList.append(dataID)
         FBStateEndTimeNotResetCustomIDList.sort()
         
-        notResetIDList = IpyGameDataPY.SetConfigEx(key, [FBStateEndTimeNotResetIDList, FBStateEndTimeNotResetCustomIDList])
+        # 加载合服定制表
+        customMixStateTimeDict = {}
+        for i in xrange(ipyDataMgr.GetFBStateTimeCustomMixCount()):
+            customIpyData = ipyDataMgr.GetFBStateTimeCustomMixByIndex(i)
+            dataID = customIpyData.GetID()
+            dataMapID = customIpyData.GetDataMapID()
+            openMixDay = customIpyData.GetMixServerDay()
+            startHour, startMinute = customIpyData.GetStartHour(), customIpyData.GetStartMinute()
+            endHour, endMinute = customIpyData.GetEndHour(), customIpyData.GetEndMinute()
+            startTimeList, endTimeDict = customMixStateTimeDict.get(dataMapID, [[], {}])
+            startTimeList.append([openMixDay, startHour, startMinute])
+            endTimeDict[dataID] = [openMixDay, endHour, endMinute]
+            customMixStateTimeDict[dataMapID] = [startTimeList, endTimeDict]
+            
+        FBStateEndTimeNotResetCustomMixIDList = []
+        for dataMapID, timeInfo in customMixStateTimeDict.items():
+            startTimeList, endTimeDict = timeInfo
+            for dataID, endTime in endTimeDict.items():
+                # 结束时间属于某一条的开启时间,则不重置,具体状态由另一条决定
+                if endTime in startTimeList:
+                    FBStateEndTimeNotResetCustomMixIDList.append(dataID)
+        FBStateEndTimeNotResetCustomMixIDList.sort()
+        
+        notResetIDList = IpyGameDataPY.SetConfigEx(key, [FBStateEndTimeNotResetIDList, FBStateEndTimeNotResetCustomIDList, FBStateEndTimeNotResetCustomMixIDList])
         GameWorld.Log("加载副本状态结束时间不需要重置状态值的数据ID列表:")
-        GameWorld.Log("    不需要重置的常规ID: %s" % FBStateEndTimeNotResetIDList)
-        GameWorld.Log("    不需要重置的定制ID: %s" % FBStateEndTimeNotResetCustomIDList)
+        GameWorld.Log("    不需要重置的常规常规ID: %s" % FBStateEndTimeNotResetIDList)
+        GameWorld.Log("    不需要重置的开服定制ID: %s" % FBStateEndTimeNotResetCustomIDList)
+        GameWorld.Log("    不需要重置的合服定制ID: %s" % FBStateEndTimeNotResetCustomMixIDList)
     return notResetIDList
 
 def __GetTodayFBStateTimeInfo():
     key = "TodayFBStateTimeInfo"
     openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
+    isMixServer = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_IsMixServer)
+    mixServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_MixServerDay) + 1
+    loadSign = [openServerDay, isMixServer, mixServerDay]
     TodayFBStateTimeInfo = IpyGameDataPY.GetConfigEx(key)
-    if TodayFBStateTimeInfo and TodayFBStateTimeInfo[0] == openServerDay:
-        #GameWorld.DebugLog("已经加载过本日副本状态处理信息!openServerDay=%s" % openServerDay)
+    if TodayFBStateTimeInfo and TodayFBStateTimeInfo[0] == loadSign:
+        #GameWorld.DebugLog("已经加载过本日副本状态处理信息!loadSign=%s" % loadSign)
         return TodayFBStateTimeInfo[1]
     
     openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
@@ -850,9 +899,11 @@
         return []
     
     curMaxCustomServerDay = IpyGameDataPY.GetFuncCfg("OperationAction", 1) - openServerWeekday + 1 # 最大有效定制开服天
+    maxCustomServerDayMix = IpyGameDataPY.GetFuncCfg("MixServer", 1)
     GameWorld.Log("===== 加载今天副本状态时间表 =====")
-    GameWorld.Log("    开服是星期%s, 开服第%s天, 当前星期%s,%s点%s分 !" % (openServerWeekday, openServerDay, curWeekDay, curHour, curMinute))
-    GameWorld.Log("    最大有效定制开服天: %s" % (curMaxCustomServerDay))
+    GameWorld.Log("开服是星期%s, 开服第%s天, 当前星期%s,%s点%s分 !" % (openServerWeekday, openServerDay, curWeekDay, curHour, curMinute))
+    GameWorld.Log("最大有效定制开服天: %s" % (curMaxCustomServerDay))
+    GameWorld.Log("是否合服: %s, 合服天: %s, 最大定制合服天: %s" % (isMixServer, mixServerDay, maxCustomServerDayMix))
     
     ipyDataMgr = IpyGameDataPY.IPY_Data()
     
@@ -861,7 +912,9 @@
     # 暂固定前2周定制有效, 为方便GM命令测试,这里用开服天做判断,不用开服周
     if openServerDay <= curMaxCustomServerDay:
         customIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("FBStateTimeCustom", openServerWeekday)
-        GameWorld.Log("    本周定制的副本活动条数: %s" % len(customIpyDataList))
+        if not customIpyDataList:
+            customIpyDataList = []
+        GameWorld.Log("    本周定制的开服副本活动条数: %s" % len(customIpyDataList))
         customIDList = [] # 本周定制的数据表ID
         todayCustomIDList = [] # 今天定制的数据表ID
         for customIpyData in customIpyDataList:
@@ -872,12 +925,26 @@
             customIDList.append(dataID)
             if customIpyData.GetOpenServerDay() == openServerDay:
                 todayCustomIDList.append(dataID)
-                isCustom, startWeekDay, endWeekDay = True, curWeekDay, curWeekDay
-                fbStateTimeInfoList.append([isCustom, startWeekDay, endWeekDay, customIpyData])
-                GameWorld.Log("    今天要处理的副本状态配置: 是否定制=%s,dataID=%s" % (isCustom, dataID))
-        GameWorld.Log("    本周定制的配置表ID列表: %s" % (customIDList))
-        GameWorld.Log("    本周定制的副本地图列表: %s" % (customMapIDList))
-        GameWorld.Log("    今天定制的表ID列表=%s" % (todayCustomIDList))
+                customType, startWeekDay, endWeekDay = 1, curWeekDay, curWeekDay
+                fbStateTimeInfoList.append([customType, startWeekDay, endWeekDay, customIpyData])
+                GameWorld.Log("    今天要处理的开服副本状态配置: customType=%s,dataID=%s" % (customType, dataID))
+        GameWorld.Log("    本周定制的开服副本表ID列表: %s" % (customIDList))
+        GameWorld.Log("    本周定制的开服副本地图列表: %s" % (customMapIDList))
+        GameWorld.Log("    今天定制的开服副本表ID列表=%s" % (todayCustomIDList))
+    elif isMixServer and mixServerDay <= maxCustomServerDayMix:
+        customIpyDataList = IpyGameDataPY.GetIpyGameDataListNotLog("FBStateTimeCustomMix", mixServerDay)
+        if not customIpyDataList:
+            customIpyDataList = []
+        GameWorld.Log("    本日定制的合服副本活动条数: %s" % len(customIpyDataList))
+        for customIpyData in customIpyDataList:
+            dataID = customIpyData.GetID()
+            dataMapID = customIpyData.GetDataMapID()
+            if dataMapID not in customMapIDList:
+                customMapIDList.append(dataMapID)
+            customType, startWeekDay, endWeekDay = 2, curWeekDay, curWeekDay
+            fbStateTimeInfoList.append([customType, startWeekDay, endWeekDay, customIpyData])
+            GameWorld.Log("    今天要处理的合服副本状态配置: customType=%s,dataID=%s" % (customType, dataID))
+        GameWorld.Log("    本日定制的合服副本地图列表: %s" % (customMapIDList))
     else:
         GameWorld.Log("    超过最大定制开服天,不定制,走常规副本状态时间!")
         
@@ -891,43 +958,43 @@
             GameWorld.Log("    dataID=%s,dataMapID=%s, 在本周定制的副本地图列表里,不处理!" % (dataID, dataMapID))
             continue
         # 暂不支持跨天的活动
-        isCustom, startWeekDay, endWeekDay = False, fbStateTimeIpyData.GetStartWeekday(), fbStateTimeIpyData.GetStartWeekday()
+        customType, startWeekDay, endWeekDay = 0, fbStateTimeIpyData.GetStartWeekday(), fbStateTimeIpyData.GetStartWeekday()
         if curWeekDay != startWeekDay:
-            GameWorld.Log("    dataID=%s,dataMapID=%s, 不是本天的副本活动,不处理!curWeekDay=%s,startWeekDay=%s" 
+            GameWorld.Log("    dataID=%s,dataMapID=%s, 不是本天的副本活动,不处理! curWeekDay=%s,startWeekDay=%s" 
                           % (dataID, dataMapID, curWeekDay, startWeekDay))
             continue 
-        fbStateTimeInfoList.append([isCustom, startWeekDay, endWeekDay, fbStateTimeIpyData])
-        GameWorld.Log("    今天要处理的副本状态配置: 是否定制=%s,dataID=%s" % (isCustom, dataID))
+        fbStateTimeInfoList.append([customType, startWeekDay, endWeekDay, fbStateTimeIpyData])
+        GameWorld.Log("    今天要处理的副本状态配置: customType=%s,dataID=%s" % (customType, dataID))
         
-    TodayFBStateTimeInfo = IpyGameDataPY.SetConfigEx(key, [openServerDay, fbStateTimeInfoList])
-    GameWorld.Log("本日副本活动状态信息加载完毕!")
+    TodayFBStateTimeInfo = IpyGameDataPY.SetConfigEx(key, [loadSign, fbStateTimeInfoList])
+    GameWorld.Log("本日副本活动状态信息加载完毕! loadSign=%s" % loadSign)
     GameWorld.Log("=============================================================")
     return TodayFBStateTimeInfo[1]
 
 def Dispose_FBStateTime():
     ## 副本状态时间表状态处理, 支持 goon作用,开关服状态不受影响,服务器重新启动会自动变更为所有时间段的状态值
     
-
-    FBStateEndTimeNotResetIDList, FBStateEndTimeNotResetCustomIDList = __GetFBStateEndTimeNotResetIDList()
-    openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
+    FBStateEndTimeNotResetIDList, FBStateEndTimeNotResetCustomIDList, FBStateEndTimeNotResetCustomMixIDList = __GetFBStateEndTimeNotResetIDList()
+    #openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
     curDateTime = GameWorld.GetServerTime()
     curWeekDay, curHour, curMinute = curDateTime.weekday() + 1, curDateTime.hour, curDateTime.minute
     
     curTimeWHM = curWeekDay * 10000 + curHour * 100 + curMinute
     
-    openServerWeekday = GameWorldProcess.GetOpenServerWeekday() # 服务器开服时是星期几
-    GameWorld.DebugLog("副本状态时间表状态处理...开服是星期%s, 开服第%s天, 当前星期%s,%s点%s分" 
-                       % (openServerWeekday, openServerDay, curWeekDay, curHour, curMinute))
-    GameWorld.DebugLog("    FBStateEndTimeNotResetIDList=%s" % (FBStateEndTimeNotResetIDList))
-    GameWorld.DebugLog("    FBStateEndTimeNotResetCustomIDList=%s" % (FBStateEndTimeNotResetCustomIDList))
+    #openServerWeekday = GameWorldProcess.GetOpenServerWeekday() # 服务器开服时是星期几
+    #GameWorld.DebugLog("副本状态时间表状态处理...开服是星期%s, 开服第%s天, 当前星期%s,%s点%s分" 
+    #                   % (openServerWeekday, openServerDay, curWeekDay, curHour, curMinute))
+    #GameWorld.DebugLog("    FBStateEndTimeNotResetIDList=%s" % (FBStateEndTimeNotResetIDList))
+    #GameWorld.DebugLog("    FBStateEndTimeNotResetCustomIDList=%s" % (FBStateEndTimeNotResetCustomIDList))
+    #GameWorld.DebugLog("    FBStateEndTimeNotResetCustomMixIDList=%s" % (FBStateEndTimeNotResetCustomMixIDList))
     
     gameWorld = GameWorld.GetGameWorld()
     fbStateTimeInfoList = __GetTodayFBStateTimeInfo()
     
-    for isCustom, startWeekDay, endWeekDay, ipyData in fbStateTimeInfoList:
+    for customType, startWeekDay, endWeekDay, ipyData in fbStateTimeInfoList:
         dataID = ipyData.GetID()
         dataMapID = ipyData.GetDataMapID()
-        GameWorld.DebugLog("    isCustom=%s,dataID=%s,dataMapID=%s" % (isCustom, dataID, dataMapID))
+        #GameWorld.DebugLog("    customType=%s,dataID=%s,dataMapID=%s" % (customType, dataID, dataMapID))
         startHour, startMinute = ipyData.GetStartHour(), ipyData.GetStartMinute()
         endHour, endMinute = ipyData.GetEndHour(), ipyData.GetEndMinute()
         # 星期配置0代表每天
@@ -960,7 +1027,9 @@
             #GameWorld.DebugLog("        当前是开始时间!")
         # 是结束时间
         elif curTimeWHM == endTimeWHM:
-            if (isCustom and dataID not in FBStateEndTimeNotResetCustomIDList) or (not isCustom and dataID not in FBStateEndTimeNotResetIDList):
+            if (customType == 1 and dataID not in FBStateEndTimeNotResetCustomIDList) \
+                or (customType == 2 and dataID not in FBStateEndTimeNotResetCustomMixIDList) \
+                or (not customType and dataID not in FBStateEndTimeNotResetIDList):
                 isReset = True
             #GameWorld.DebugLog("        当前是结束时间! isReset=%s,FBStateEndTimeNotResetIDList=%s" % (isReset, FBStateEndTimeNotResetIDList))
         # 结束时间是下周
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index 52e00c7..820e263 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -78,6 +78,15 @@
                         ("dict", "NotifyInfo", 0),
                         ),
 
+                "DailyActionCustomMix":(
+                        ("DWORD", "ID", 0),
+                        ("DWORD", "MixServerDay", 1),
+                        ("BYTE", "DailyID", 0),
+                        ("list", "OpenTimeList", 0),
+                        ("DWORD", "Duration", 0),
+                        ("dict", "NotifyInfo", 0),
+                        ),
+
                 "FBStateTime":(
                         ("DWORD", "ID", 1),
                         ("DWORD", "DataMapID", 0),
@@ -95,6 +104,19 @@
                         ("DWORD", "ID", 0),
                         ("BYTE", "OpenServerWeek", 1),
                         ("DWORD", "OpenServerDay", 0),
+                        ("DWORD", "DataMapID", 0),
+                        ("BYTE", "StartHour", 0),
+                        ("BYTE", "StartMinute", 0),
+                        ("BYTE", "EndHour", 0),
+                        ("BYTE", "EndMinute", 0),
+                        ("BYTE", "CanEnter", 0),
+                        ("BYTE", "StateValue", 0),
+                        ("dict", "NotifyInfoDict", 0),
+                        ),
+
+                "FBStateTimeCustomMix":(
+                        ("DWORD", "ID", 0),
+                        ("DWORD", "MixServerDay", 1),
                         ("DWORD", "DataMapID", 0),
                         ("BYTE", "StartHour", 0),
                         ("BYTE", "StartMinute", 0),
@@ -588,6 +610,25 @@
     def GetDuration(self): return self.Duration # 持续时间, 0为不限制
     def GetNotifyInfo(self): return self.NotifyInfo # 广播提示信息
 
+# 日常活动表定制表合服
+class IPY_DailyActionCustomMix():
+    
+    def __init__(self):
+        self.ID = 0
+        self.MixServerDay = 0
+        self.DailyID = 0
+        self.OpenTimeList = []
+        self.Duration = 0
+        self.NotifyInfo = {}
+        return
+        
+    def GetID(self): return self.ID # ID
+    def GetMixServerDay(self): return self.MixServerDay # 合服第几天
+    def GetDailyID(self): return self.DailyID # 日常活动ID
+    def GetOpenTimeList(self): return self.OpenTimeList # 开启时间列表
+    def GetDuration(self): return self.Duration # 持续时间, 0为不限制
+    def GetNotifyInfo(self): return self.NotifyInfo # 广播提示信息
+
 # 副本状态时间表
 class IPY_FBStateTime():
     
@@ -635,6 +676,33 @@
     def GetID(self): return self.ID # ID
     def GetOpenServerWeek(self): return self.OpenServerWeek # 开服是周几
     def GetOpenServerDay(self): return self.OpenServerDay # 开服第几天
+    def GetDataMapID(self): return self.DataMapID # 所属的玩法数据地图ID
+    def GetStartHour(self): return self.StartHour # 开始时
+    def GetStartMinute(self): return self.StartMinute # 开始分
+    def GetEndHour(self): return self.EndHour # 结束时
+    def GetEndMinute(self): return self.EndMinute # 结束分
+    def GetCanEnter(self): return self.CanEnter # 是否可进入副本
+    def GetStateValue(self): return self.StateValue # 状态值
+    def GetNotifyInfoDict(self): return self.NotifyInfoDict # 广播提示信息
+
+# 副本状态时间定制表合服
+class IPY_FBStateTimeCustomMix():
+    
+    def __init__(self):
+        self.ID = 0
+        self.MixServerDay = 0
+        self.DataMapID = 0
+        self.StartHour = 0
+        self.StartMinute = 0
+        self.EndHour = 0
+        self.EndMinute = 0
+        self.CanEnter = 0
+        self.StateValue = 0
+        self.NotifyInfoDict = {}
+        return
+        
+    def GetID(self): return self.ID # ID
+    def GetMixServerDay(self): return self.MixServerDay # 合服第几天
     def GetDataMapID(self): return self.DataMapID # 所属的玩法数据地图ID
     def GetStartHour(self): return self.StartHour # 开始时
     def GetStartMinute(self): return self.StartMinute # 开始分
@@ -1481,10 +1549,14 @@
         self.ipyDailyActionLen = len(self.ipyDailyActionCache)
         self.ipyDailyActionCustomCache = self.__LoadFileData("DailyActionCustom", IPY_DailyActionCustom)
         self.ipyDailyActionCustomLen = len(self.ipyDailyActionCustomCache)
+        self.ipyDailyActionCustomMixCache = self.__LoadFileData("DailyActionCustomMix", IPY_DailyActionCustomMix)
+        self.ipyDailyActionCustomMixLen = len(self.ipyDailyActionCustomMixCache)
         self.ipyFBStateTimeCache = self.__LoadFileData("FBStateTime", IPY_FBStateTime)
         self.ipyFBStateTimeLen = len(self.ipyFBStateTimeCache)
         self.ipyFBStateTimeCustomCache = self.__LoadFileData("FBStateTimeCustom", IPY_FBStateTimeCustom)
         self.ipyFBStateTimeCustomLen = len(self.ipyFBStateTimeCustomCache)
+        self.ipyFBStateTimeCustomMixCache = self.__LoadFileData("FBStateTimeCustomMix", IPY_FBStateTimeCustomMix)
+        self.ipyFBStateTimeCustomMixLen = len(self.ipyFBStateTimeCustomMixCache)
         self.ipyFBFuncCache = self.__LoadFileData("FBFunc", IPY_FBFunc)
         self.ipyFBFuncLen = len(self.ipyFBFuncCache)
         self.ipyFBLineCache = self.__LoadFileData("FBLine", IPY_FBLine)
@@ -1733,10 +1805,14 @@
     def GetDailyActionByIndex(self, index): return self.ipyDailyActionCache[index]
     def GetDailyActionCustomCount(self): return self.ipyDailyActionCustomLen
     def GetDailyActionCustomByIndex(self, index): return self.ipyDailyActionCustomCache[index]
+    def GetDailyActionCustomMixCount(self): return self.ipyDailyActionCustomMixLen
+    def GetDailyActionCustomMixByIndex(self, index): return self.ipyDailyActionCustomMixCache[index]
     def GetFBStateTimeCount(self): return self.ipyFBStateTimeLen
     def GetFBStateTimeByIndex(self, index): return self.ipyFBStateTimeCache[index]
     def GetFBStateTimeCustomCount(self): return self.ipyFBStateTimeCustomLen
     def GetFBStateTimeCustomByIndex(self, index): return self.ipyFBStateTimeCustomCache[index]
+    def GetFBStateTimeCustomMixCount(self): return self.ipyFBStateTimeCustomMixLen
+    def GetFBStateTimeCustomMixByIndex(self, index): return self.ipyFBStateTimeCustomMixCache[index]
     def GetFBFuncCount(self): return self.ipyFBFuncLen
     def GetFBFuncByIndex(self, index): return self.ipyFBFuncCache[index]
     def GetFBLineCount(self): return self.ipyFBLineLen

--
Gitblit v1.8.0