From d9f13c5e9a02f31cad2f58357acd3140809e88c1 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 11 九月 2018 19:57:27 +0800
Subject: [PATCH] fix:3477【后端】【1.0.15】【1.1.0】娲皇遗迹新增Vip特权:副本购买次数

---
 ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py |  143 ++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 110 insertions(+), 33 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
index e807a07..75e262c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/IpyGameDataPY.py
@@ -53,6 +53,7 @@
                         ("BYTE", "EliteCnt", 0),
                         ("DWORD", "NeedMoney", 0),
                         ("DWORD", "WeekMissionMoneyMax", 0),
+                        ("BYTE", "BossFBCnt", 0),
                         ),
 
                 "MarketQuery":(
@@ -79,8 +80,17 @@
 
                 "DailyAction":(
                         ("DWORD", "DailyID", 1),
-                        ("BYTE", "OpenServerDay", 0),
-                        ("char", "OpenTime", 0),
+                        ("dict", "OpenTimeDict", 0),
+                        ("DWORD", "Duration", 0),
+                        ("dict", "NotifyInfo", 0),
+                        ),
+
+                "DailyActionCustom":(
+                        ("DWORD", "ID", 0),
+                        ("BYTE", "OpenServerWeek", 1),
+                        ("DWORD", "OpenServerDay", 1),
+                        ("BYTE", "DailyID", 0),
+                        ("list", "OpenTimeList", 0),
                         ("DWORD", "Duration", 0),
                         ("dict", "NotifyInfo", 0),
                         ),
@@ -88,12 +98,23 @@
                 "FBStateTime":(
                         ("DWORD", "ID", 1),
                         ("DWORD", "DataMapID", 0),
-                        ("BYTE", "OpenServerWeek", 0),
-                        ("BYTE", "OpenServerDay", 0),
                         ("BYTE", "StartWeekday", 0),
                         ("BYTE", "StartHour", 0),
                         ("BYTE", "StartMinute", 0),
-                        ("BYTE", "EndWeekday", 0),
+                        ("BYTE", "EndHour", 0),
+                        ("BYTE", "EndMinute", 0),
+                        ("BYTE", "CanEnter", 0),
+                        ("BYTE", "StateValue", 0),
+                        ("dict", "NotifyInfoDict", 0),
+                        ),
+
+                "FBStateTimeCustom":(
+                        ("DWORD", "ID", 0),
+                        ("BYTE", "OpenServerWeek", 1),
+                        ("DWORD", "OpenServerDay", 1),
+                        ("DWORD", "DataMapID", 0),
+                        ("BYTE", "StartHour", 0),
+                        ("BYTE", "StartMinute", 0),
                         ("BYTE", "EndHour", 0),
                         ("BYTE", "EndMinute", 0),
                         ("BYTE", "CanEnter", 0),
@@ -299,7 +320,8 @@
         self.DeputyLeaderCnt = 0
         self.EliteCnt = 0
         self.NeedMoney = 0
-        self.WeekMissionMoneyMax = 0
+        self.WeekMissionMoneyMax = 0
+        self.BossFBCnt = 0
         return
         
     def GetFamilyLV(self): return self.FamilyLV # 仙盟等级
@@ -307,7 +329,8 @@
     def GetDeputyLeaderCnt(self): return self.DeputyLeaderCnt # 副盟主数量
     def GetEliteCnt(self): return self.EliteCnt # 精英数量
     def GetNeedMoney(self): return self.NeedMoney # 升级需要资金
-    def GetWeekMissionMoneyMax(self): return self.WeekMissionMoneyMax # 每周任务最大可获得仙盟资金
+    def GetWeekMissionMoneyMax(self): return self.WeekMissionMoneyMax # 每周任务最大可获得仙盟资金
+    def GetBossFBCnt(self): return self.BossFBCnt # BOSS副本次数
 
 # 集市查询表
 class IPY_MarketQuery():
@@ -360,15 +383,34 @@
     
     def __init__(self):
         self.DailyID = 0
-        self.OpenServerDay = 0
-        self.OpenTime = ""
+        self.OpenTimeDict = {}
         self.Duration = 0
         self.NotifyInfo = {}
         return
         
     def GetDailyID(self): return self.DailyID # 活动ID
-    def GetOpenServerDay(self): return self.OpenServerDay # 开服第几天开始开启,0为不限制
-    def GetOpenTime(self): return self.OpenTime # 开启时间
+    def GetOpenTimeDict(self): return self.OpenTimeDict # 开启时间
+    def GetDuration(self): return self.Duration # 持续时间, 0为不限制
+    def GetNotifyInfo(self): return self.NotifyInfo # 广播提示信息
+
+# 日常活动表定制表
+class IPY_DailyActionCustom():
+    
+    def __init__(self):
+        self.ID = 0
+        self.OpenServerWeek = 0
+        self.OpenServerDay = 0
+        self.DailyID = 0
+        self.OpenTimeList = []
+        self.Duration = 0
+        self.NotifyInfo = {}
+        return
+        
+    def GetID(self): return self.ID # ID
+    def GetOpenServerWeek(self): return self.OpenServerWeek # 开服是周几
+    def GetOpenServerDay(self): return self.OpenServerDay # 开服第几天
+    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 # 广播提示信息
 
@@ -378,12 +420,9 @@
     def __init__(self):
         self.ID = 0
         self.DataMapID = 0
-        self.OpenServerWeek = 0
-        self.OpenServerDay = 0
         self.StartWeekday = 0
         self.StartHour = 0
         self.StartMinute = 0
-        self.EndWeekday = 0
         self.EndHour = 0
         self.EndMinute = 0
         self.CanEnter = 0
@@ -393,12 +432,38 @@
         
     def GetID(self): return self.ID # ID
     def GetDataMapID(self): return self.DataMapID # 所属的玩法数据地图ID
-    def GetOpenServerWeek(self): return self.OpenServerWeek # 开服X周后开放
-    def GetOpenServerDay(self): return self.OpenServerDay # 开服X天后开放
     def GetStartWeekday(self): return self.StartWeekday # 开始星期
     def GetStartHour(self): return self.StartHour # 开始时
     def GetStartMinute(self): return self.StartMinute # 开始分
-    def GetEndWeekday(self): return self.EndWeekday # 结束星期
+    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_FBStateTimeCustom():
+    
+    def __init__(self):
+        self.ID = 0
+        self.OpenServerWeek = 0
+        self.OpenServerDay = 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 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 # 是否可进入副本
@@ -771,8 +836,12 @@
         self.ipyActionControlLen = len(self.ipyActionControlCache)
         self.ipyDailyActionCache = self.__LoadFileData("DailyAction", IPY_DailyAction)
         self.ipyDailyActionLen = len(self.ipyDailyActionCache)
+        self.ipyDailyActionCustomCache = self.__LoadFileData("DailyActionCustom", IPY_DailyActionCustom)
+        self.ipyDailyActionCustomLen = len(self.ipyDailyActionCustomCache)
         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.ipyFBLineCache = self.__LoadFileData("FBLine", IPY_FBLine)
         self.ipyFBLineLen = len(self.ipyFBLineCache)
         self.ipyChinMapCache = self.__LoadFileData("ChinMap", IPY_ChinMap)
@@ -896,22 +965,26 @@
         for i, strValue in enumerate(rowList):
             if i == 0:
                 continue
-            fieldName = fieldList[i][1]
-            strValue = strValue.lstrip().rstrip()
-            if strValue.isdigit():
-                configValue = int(strValue)
-            elif (strValue.startswith("{") and strValue.endswith("}")) \
-                or (strValue.startswith("[") and strValue.endswith("]")) \
-                or (strValue.startswith("(") and strValue.endswith(")")):
-                configValue = eval(strValue)
-            elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
-                configValue = self.__StrToDict(strValue)
-            elif ChConfig.Def_Str_Montant in strValue:
-                configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
-            elif strValue in ["-", ""]:
-                configValue = ""
-            else:
-                configValue = self.__ToFloat(strValue)
+            try:
+                fieldName = fieldList[i][1]
+                strValue = strValue.lstrip().rstrip()
+                if strValue.isdigit():
+                    configValue = int(strValue)
+                elif (strValue.startswith("{") and strValue.endswith("}")) \
+                    or (strValue.startswith("[") and strValue.endswith("]")) \
+                    or (strValue.startswith("(") and strValue.endswith(")")):
+                    configValue = eval(strValue)
+                elif "_" in strValue and type(self.__StrToDict(strValue)) == dict:
+                    configValue = self.__StrToDict(strValue)
+                elif ChConfig.Def_Str_Montant in strValue:
+                    configValue = eval("(%s,)" % strValue.replace(ChConfig.Def_Str_Montant, ","))
+                elif strValue in ["-", ""]:
+                    configValue = ""
+                else:
+                    configValue = self.__ToFloat(strValue)
+            except BaseException:
+                ErrLog("SetIpyDataError: tableName=%s,key=%s,i=%s,value=%s" % ("FuncConfig", key, i, strValue))
+                raise
             setattr(funcConfigObj, fieldName, configValue)
         self.ipyFuncConfigDict[key] = funcConfigObj
         return
@@ -979,8 +1052,12 @@
     def GetActionControlByIndex(self, index): return self.ipyActionControlCache[index]
     def GetDailyActionCount(self): return self.ipyDailyActionLen
     def GetDailyActionByIndex(self, index): return self.ipyDailyActionCache[index]
+    def GetDailyActionCustomCount(self): return self.ipyDailyActionCustomLen
+    def GetDailyActionCustomByIndex(self, index): return self.ipyDailyActionCustomCache[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 GetFBLineCount(self): return self.ipyFBLineLen
     def GetFBLineByIndex(self, index): return self.ipyFBLineCache[index]
     def GetChinMapCount(self): return self.ipyChinMapLen

--
Gitblit v1.8.0