| | |
| | | "DailyActionCustom":(
|
| | | ("DWORD", "ID", 0),
|
| | | ("BYTE", "OpenServerWeek", 1),
|
| | | ("DWORD", "OpenServerDay", 1),
|
| | | ("DWORD", "OpenServerDay", 0),
|
| | | ("BYTE", "DailyID", 0),
|
| | | ("list", "OpenTimeList", 0),
|
| | | ("DWORD", "Duration", 0),
|
| | |
| | | "FBStateTimeCustom":(
|
| | | ("DWORD", "ID", 0),
|
| | | ("BYTE", "OpenServerWeek", 1),
|
| | | ("DWORD", "OpenServerDay", 1),
|
| | | ("DWORD", "OpenServerDay", 0),
|
| | | ("DWORD", "DataMapID", 0),
|
| | | ("BYTE", "StartHour", 0),
|
| | | ("BYTE", "StartMinute", 0),
|
| | |
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActMark", 0),
|
| | | ("list", "ServerIDList", 0),
|
| | | ("BYTE", "OpenServerDayLimit", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("list", "StartTimeList", 0),
|
| | | ("list", "EndTimeList", 0),
|
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "ShopTypeList", 0),
|
| | | ),
|
| | |
|
| | | "ActFlashGiftbag":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActMark", 0),
|
| | | ("list", "ServerIDList", 0),
|
| | | ("BYTE", "OpenServerDayLimit", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("list", "StartTimeList", 0),
|
| | | ("list", "EndTimeList", 0),
|
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "GiftbagTypeList", 0),
|
| | | ),
|
| | |
|
| | | "ActExpRate":(
|
| | |
| | | ("list", "EndTimeList", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("DWORD", "AddExpRate", 0),
|
| | | ),
|
| | |
| | | ("char", "EndDate", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "TemplateIDList", 0),
|
| | | ),
|
| | |
|
| | | "ActBossReborn":(
|
| | |
| | | ("list", "ServerIDList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | |
| | | ("list", "ServerIDList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | |
| | | ("list", "ServerIDList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("BYTE", "ResetType", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("WORD", "Multiple", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ),
|
| | |
|
| | | "ActFlashSale":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "ActMark", 0),
|
| | | ("list", "ServerIDList", 0),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("list", "StartTimeList", 0),
|
| | | ("list", "EndTimeList", 0),
|
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("dict", "NotifyInfoStart", 0),
|
| | | ("dict", "NotifyInfoEnd", 0),
|
| | | ("list", "NotifyInfoLoop", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "ShopTypeList", 0),
|
| | | ),
|
| | |
|
| | | "Store":(
|
| | | ("DWORD", "ID", 1),
|
| | | ("DWORD", "ShopType", 0),
|
| | | ("BYTE", "RefreshType", 0),
|
| | | ("DWORD", "ServerLimitCnt", 0),
|
| | | ),
|
| | | }
|
| | |
|
| | |
| | | self.CfgID = 0
|
| | | self.ActMark = ""
|
| | | self.ServerIDList = []
|
| | | self.OpenServerDayLimit = 0
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.StartTimeList = []
|
| | | self.EndTimeList = []
|
| | | self.AdvanceMinutes = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.NotifyInfoLoop = []
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.ShopTypeList = [] |
| | | self.IsDayReset = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetActMark(self): return self.ActMark # 活动组标记
|
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetOpenServerDayLimit(self): return self.OpenServerDayLimit # 开服X天后有效
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetStartTimeList(self): return self.StartTimeList # 开启时间列表, 支持多个时段
|
| | | def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
|
| | | def GetAdvanceMinutes(self): return self.AdvanceMinutes # 前端提前X分钟展示活动
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetShopTypeList(self): return self.ShopTypeList # 商店类型列表 |
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置 |
| | | |
| | | # 限时礼包表 |
| | | class IPY_ActFlashGiftbag(): |
| | |
| | | self.CfgID = 0
|
| | | self.ActMark = ""
|
| | | self.ServerIDList = []
|
| | | self.OpenServerDayLimit = 0
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.StartTimeList = []
|
| | | self.EndTimeList = []
|
| | | self.AdvanceMinutes = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.NotifyInfoLoop = []
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.GiftbagTypeList = [] |
| | | self.IsDayReset = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetActMark(self): return self.ActMark # 活动组标记
|
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetOpenServerDayLimit(self): return self.OpenServerDayLimit # 开服X天后有效
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetStartTimeList(self): return self.StartTimeList # 开启时间列表, 支持多个时段
|
| | | def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
|
| | | def GetAdvanceMinutes(self): return self.AdvanceMinutes # 前端提前X分钟展示活动
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetGiftbagTypeList(self): return self.GiftbagTypeList # 礼包类型列表 |
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置 |
| | | |
| | | # 双倍经验活动表 |
| | | class IPY_ActExpRate(): |
| | |
| | | self.EndTimeList = []
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.NotifyInfoLoop = []
|
| | | self.LVLimit = 0
|
| | | self.AddExpRate = 0 |
| | | return |
| | |
| | | def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key, [可选参数1, ...]]
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetAddExpRate(self): return self.AddExpRate # 经验倍率加成,万分率 |
| | | |
| | |
| | | self.EndDate = ""
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.TemplateIDList = [] |
| | | self.NotifyInfoLoop = []
|
| | | self.IsDayReset = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | |
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetTemplateIDList(self): return self.TemplateIDList # 模板ID列表 |
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置 |
| | | |
| | | # BOSS复活活动时间表 |
| | | class IPY_ActBossReborn(): |
| | |
| | | self.ServerIDList = []
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.ResetType = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.LVLimit = 0
|
| | |
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | |
| | | self.ServerIDList = []
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.ResetType = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.LVLimit = 0 |
| | |
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级 |
| | |
| | | self.ServerIDList = []
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.ResetType = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.Multiple = 0
|
| | |
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetResetType(self): return self.ResetType # 重置类型,0-0点重置;1-5点重置
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetMultiple(self): return self.Multiple # 倍数
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级 |
| | | |
| | | # 限时抢购表 |
| | | class IPY_ActFlashSale(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.ActMark = ""
|
| | | self.ServerIDList = []
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.StartTimeList = []
|
| | | self.EndTimeList = []
|
| | | self.AdvanceMinutes = 0
|
| | | self.NotifyInfoStart = {}
|
| | | self.NotifyInfoEnd = {}
|
| | | self.NotifyInfoLoop = []
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.ShopTypeList = [] |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetActMark(self): return self.ActMark # 活动组标记
|
| | | def GetServerIDList(self): return self.ServerIDList # 服务器ID列表
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetStartTimeList(self): return self.StartTimeList # 开启时间列表, 支持多个时段
|
| | | def GetEndTimeList(self): return self.EndTimeList # 结束时间列表, 支持多个时段
|
| | | def GetAdvanceMinutes(self): return self.AdvanceMinutes # 前端提前X分钟展示活动
|
| | | def GetNotifyInfoStart(self): return self.NotifyInfoStart # 全服提示信息 - 相对开始时间
|
| | | def GetNotifyInfoEnd(self): return self.NotifyInfoEnd # 全服提示信息 - 相对结束时间
|
| | | def GetNotifyInfoLoop(self): return self.NotifyInfoLoop # 全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetShopTypeList(self): return self.ShopTypeList # 商店类型列表 |
| | | |
| | | # 商城表 |
| | | class IPY_Store(): |
| | | |
| | | def __init__(self): |
| | | self.ID = 0
|
| | | self.ShopType = 0
|
| | | self.RefreshType = 0
|
| | | self.ServerLimitCnt = 0 |
| | | return |
| | | |
| | | def GetID(self): return self.ID # ID
|
| | | def GetShopType(self): return self.ShopType # 商店类型
|
| | | def GetRefreshType(self): return self.RefreshType # 刷新类型 0-不重置,1-onWeek0点,2-onWeek5点,3-OnDay0点,4-OnDay5点
|
| | | def GetServerLimitCnt(self): return self.ServerLimitCnt # 全服限制数量 |
| | |
|
| | |
|
| | | def Log(msg, playerID=0, par=0):
|
| | |
| | | self.ipyUniquenessArriveLen = len(self.ipyUniquenessArriveCache)
|
| | | self.ipyActRealmPointCache = self.__LoadFileData("ActRealmPoint", IPY_ActRealmPoint)
|
| | | self.ipyActRealmPointLen = len(self.ipyActRealmPointCache)
|
| | | self.ipyActFlashSaleCache = self.__LoadFileData("ActFlashSale", IPY_ActFlashSale)
|
| | | self.ipyActFlashSaleLen = len(self.ipyActFlashSaleCache)
|
| | | self.ipyStoreCache = self.__LoadFileData("Store", IPY_Store)
|
| | | self.ipyStoreLen = len(self.ipyStoreCache)
|
| | | Log("IPY_FuncConfig count=%s" % len(self.ipyFuncConfigDict))
|
| | | Log("IPY_DataMgr InitOK!")
|
| | | return
|
| | |
| | | def GetUniquenessArriveByIndex(self, index): return self.ipyUniquenessArriveCache[index]
|
| | | def GetActRealmPointCount(self): return self.ipyActRealmPointLen
|
| | | def GetActRealmPointByIndex(self, index): return self.ipyActRealmPointCache[index]
|
| | | def GetActFlashSaleCount(self): return self.ipyActFlashSaleLen
|
| | | def GetActFlashSaleByIndex(self, index): return self.ipyActFlashSaleCache[index]
|
| | | def GetStoreCount(self): return self.ipyStoreLen
|
| | | def GetStoreByIndex(self, index): return self.ipyStoreCache[index]
|
| | |
|
| | | IPYData = IPY_DataMgr()
|
| | | def IPY_Data(): return IPYData
|
| | |
| | | '''查询条件下与对应查询字段参考值相近的数据实例;参考值小于配置表最小值时返回none,大于最大值时返回最大值对应的实例
|
| | | @param dtName: 表名,不含tag
|
| | | @param keyName: 参考字段名
|
| | | @param keyValue: 参考字段值
|
| | | @param keyValue: 参考字段值,大于等于字段值时返回对应数据
|
| | | @param conditionDict: 查询条件,{查询字段名:字段值, ...}
|
| | | @return: 找不到数据返回 None , 否则返回对应的 ipyData 数据实例
|
| | | '''
|
| | |
| | | for i in xrange(near - 1, low - 1, -1):
|
| | | nearData = dataList[i]
|
| | | nearValue = getattr(nearData, "%s" % keyName)
|
| | | if nearValue < keyValue:
|
| | | if nearValue <= keyValue:
|
| | | return nearData
|
| | |
|
| | | elif keyValue > nearValue:
|