3494 【后端】开服前14天运营活动定制
3443 【后端】Boss复活活动,时间段支持日期跨天或日期支持重置时间点设置(如0点或5点)
1972 【后端】运营活动支持循环广播
| | |
| | | DWORD _CfgID; //配置ID
|
| | | char ActMark; //活动组标记
|
| | | list ServerIDList; //服务器ID列表
|
| | | BYTE OpenServerDayLimit; //开服X天后有效
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | list StartTimeList; //开启时间列表, 支持多个时段
|
| | | list EndTimeList; //结束时间列表, 支持多个时段
|
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list ShopTypeList; //商店类型列表
|
| | | };
|
| | |
|
| | | //限时礼包表
|
| | |
| | | DWORD _CfgID; //配置ID
|
| | | char ActMark; //活动组标记
|
| | | list ServerIDList; //服务器ID列表
|
| | | BYTE OpenServerDayLimit; //开服X天后有效
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | list StartTimeList; //开启时间列表, 支持多个时段
|
| | | list EndTimeList; //结束时间列表, 支持多个时段
|
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list GiftbagTypeList; //礼包类型列表
|
| | | };
|
| | |
|
| | | //双倍经验活动表
|
| | |
| | | char EndDate; //结束日期
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | WORD LVLimit; //限制等级
|
| | | list NotifyInfoLoop; //全服提示信息 - 循环广播[间隔分钟, 广播key]
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list TemplateIDList; //模板ID列表
|
| | | };
|
| | |
|
| | | //BOSS复活活动时间表
|
| | |
| | | list ServerIDList; //服务器ID列表
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | WORD LVLimit; //限制等级
|
| | |
| | | list ServerIDList; //服务器ID列表
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | BYTE ResetType; //重置类型,0-0点重置;1-5点重置
|
| | | dict NotifyInfoStart; //全服提示信息 - 相对开始时间
|
| | | dict NotifyInfoEnd; //全服提示信息 - 相对结束时间
|
| | | WORD Multiple; //倍数
|
| | | WORD LVLimit; //限制等级
|
| | | }; |
| | | };
|
| | |
| | | char EndDate; //结束日期
|
| | | list StartTimeList; //开启时间列表, 支持多个时段
|
| | | list EndTimeList; //结束时间列表, 支持多个时段
|
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list ShopTypeList; //商店类型列表
|
| | |
| | | char EndDate; //结束日期
|
| | | list StartTimeList; //开启时间列表, 支持多个时段
|
| | | list EndTimeList; //结束时间列表, 支持多个时段
|
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list GiftbagList; //礼包模板类型列表
|
| | | list GiftbagTypeList; //礼包类型列表
|
| | | };
|
| | |
|
| | | //限时礼包模板表
|
| | |
| | | char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
|
| | | };
|
| | |
|
| | | //双倍经验活动表
|
| | |
|
| | | struct tagActExpRate
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | WORD LVLimit; //限制等级
|
| | | DWORD AddExpRate; //经验倍率加成,万分率
|
| | | };
|
| | |
|
| | | //消费返利活动表
|
| | |
|
| | | struct tagActCostRebate
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list TemplateIDList; //模板ID列表
|
| | | };
|
| | |
|
| | | //消费返利模板表
|
| | |
|
| | | struct tagCostRebateTemplate
|
| | |
| | | BYTE AwardIndex; //返利奖励索引0~31,同个模板中不重复
|
| | | list AwardItemList; //返利物品信息列表 [(物品ID,个数,是否绑定),...]
|
| | | char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
|
| | | };
|
| | |
|
| | | //BOSS复活活动时间表
|
| | |
|
| | | struct tagActBossReborn
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | char StartDate; //开启日期
|
| | | char EndDate; //结束日期
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE TemplateID; //模板编号
|
| | | };
|
| | |
|
| | | //BOSS复活表
|
| | |
| | | list Reward; //奖励物品ID1
|
| | | };
|
| | |
|
| | | //多倍修行点活动时间表
|
| | |
|
| | | struct tagActRealmPoint
|
| | | {
|
| | | DWORD _CfgID; //配置ID
|
| | | WORD Multiple; //倍数
|
| | | WORD LVLimit; //限制等级
|
| | | };
|
| | |
|
| | | //宗门试炼兑换表
|
| | |
|
| | |
| | | ATTR_CALL_TIME = ['weekday', 'year', 'month', 'day', 'hour', 'minute']
|
| | |
|
| | | (
|
| | | OperationAction_OpenServerDay, # 信息所属开服天
|
| | | OperationAction_ReloadSign, # 信息重载标记
|
| | | OperationAction_TodayInfo, # 当日的活动信息
|
| | | OperationAction_MapServerInfo, # 同步地图的活动信息
|
| | | ) = range(3)
|
| | |
| | | dictName = ChConfig.Def_WorldKey_OperationActionState % actName
|
| | | state = gameWorld.GetDictByKey(dictName)
|
| | |
|
| | | sendMapServerMsgDict = mapServerInfoDict.get(actName, {}) if state else {}
|
| | | sendMapServerMsgDict = mapServerInfoDict.get(actName, {})
|
| | | sendMapServerMsgDict[ShareDefine.ActKey_State] = state
|
| | | GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_OperationActionInfo % actName, sendMapServerMsgDict)
|
| | |
|
| | |
| | | key = "OperationActionInfo"
|
| | | openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
|
| | | OperationActionInfo = IpyGameDataPY.GetConfigEx(key)
|
| | | if OperationActionInfo and OperationActionInfo[OperationAction_OpenServerDay] == openServerDay:
|
| | | serverTime = GameWorld.GetServerTime()
|
| | | curHour = serverTime.hour
|
| | | reloadSignHour = 0 if curHour < 5 else 5
|
| | | reloadSign = "%s_%s" % (openServerDay, reloadSignHour)
|
| | | if OperationActionInfo and OperationActionInfo[OperationAction_ReloadSign] == reloadSign:
|
| | | #GameWorld.DebugLog("已经加载过本日运营活动处理信息!openServerDay=%s" % openServerDay)
|
| | | return False, OperationActionInfo
|
| | |
|
| | | # 因为后面的时间判断都是精确到分的,而处理此逻辑的时候可能不是0秒,所以这里的datetime取当前时间精确到分的
|
| | | serverTime = GameWorld.GetServerTime()
|
| | | curDateTimeStr = "%d-%d-%d %02d:%02d:00" % (serverTime.year, serverTime.month, serverTime.day, serverTime.hour, serverTime.minute)
|
| | | curDateTime = datetime.datetime.strptime(curDateTimeStr, ChConfig.TYPE_Time_Format)
|
| | | GameWorld.Log("加载本日运营活动信息: %s, openServerDay=%s" % (curDateTime, openServerDay))
|
| | |
|
| | | customMaxServerDay = 14 # 定制运营活动最大开服天
|
| | | operationActionDict = {}
|
| | | mapServerOperationActionDict = {}
|
| | | serverID = GameWorld.GetServerID()
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | |
|
| | | GameWorld.Log("===== 加载本日运营活动信息: %s, serverID=%s,openServerDay=%s,customMaxServerDay=%s,reloadSign=%s =====" |
| | | % (curDateTime, serverID, openServerDay, customMaxServerDay, reloadSign))
|
| | | |
| | | for actName in ShareDefine.OperationActionNameList:
|
| | |
|
| | | # 取出本活动所属本服ID的所有配置
|
| | | curServerActIpyDataList = __GetOperationActionServerIpyDataList(ipyDataMgr, serverID, actName)
|
| | | |
| | | GameWorld.Log("加载运营活动: actName=%s,可处理条数=%s" % (actName, len(curServerActIpyDataList)))
|
| | | needStartList = [] # [startDateTime, ...]
|
| | | needEndList = [] # [endDateTime, ...]
|
| | | needNotifyDict = {} # {notifyDateTime:[notifyKey, [参数]], ...}
|
| | |
| | | # 注意:每个活动配置会有多个活动时间点,但是有且只能生效一条活动配置,换句话说就是每个活动配置时间不允许交叉
|
| | | for ipyData in curServerActIpyDataList:
|
| | |
|
| | | cfgID = ipyData.GetCfgID()
|
| | | startDateStr = ipyData.GetStartDate()
|
| | | endDateStr = ipyData.GetEndDate()
|
| | | GameWorld.Log(" cfgID=%s,mark=%s,serverIDList=%s,startDateStr=%s,endDateStr=%s,openServerDay=%s,curDateTime=%s" |
| | | % (cfgID, ipyData.GetActMark(), ipyData.GetServerIDList(), startDateStr, endDateStr, openServerDay, curDateTime))
|
| | | # 按开服天开的
|
| | | if startDateStr.isdigit() and endDateStr.isdigit():
|
| | | startServerDay, endServerDay = int(startDateStr), int(endDateStr)
|
| | | if openServerDay > endServerDay:
|
| | | GameWorld.Log(" 当前开服天超过活动结束开服天,不处理! cfgID=%s,%s ~ %s < openServerDay(%s)" % (cfgID, startDateStr, endDateStr, openServerDay))
|
| | | continue
|
| | | openServerDateTime = curDateTime + datetime.timedelta(days=(startServerDay-openServerDay))
|
| | | endServerDateTime = curDateTime + datetime.timedelta(days=(endServerDay-openServerDay))
|
| | | startDateStr = "%d-%d-%d" % (openServerDateTime.year, openServerDateTime.month, openServerDateTime.day)
|
| | | endDateStr = "%d-%d-%d" % (endServerDateTime.year, endServerDateTime.month, endServerDateTime.day)
|
| | | GameWorld.Log(" 开服天转化为日期: %s ~ %s" % (startDateStr, endDateStr))
|
| | | |
| | | elif openServerDay <= customMaxServerDay:
|
| | | GameWorld.Log(" 按日期开的在开服定制限制天内,不处理! cfgID=%s,%s ~ %s,openServerDay=%s" % (cfgID, startDateStr, endDateStr, openServerDay))
|
| | | continue
|
| | |
|
| | | if hasattr(ipyData, "GetStartTimeList") and hasattr(ipyData, "GetEndTimeList"):
|
| | | startHMStrList = ipyData.GetStartTimeList()
|
| | |
| | |
|
| | | notifyInfoDictStart = ipyData.GetNotifyInfoStart() if hasattr(ipyData, "GetNotifyInfoStart") else {}
|
| | | notifyInfoDictEnd = ipyData.GetNotifyInfoEnd() if hasattr(ipyData, "GetNotifyInfoEnd") else {}
|
| | | notifyInfoLoopInfo = ipyData.GetNotifyInfoLoop() if hasattr(ipyData, "GetNotifyInfoLoop") else {} # [循环分钟, 广播key]
|
| | |
|
| | | if len(startHMStrList) != len(endHMStrList):
|
| | | GameWorld.ErrLog("活动配置开始及结束时间个数不匹配! actName=%s,cfgID=%s" % (actName, ipyData.GetCfgID()))
|
| | | GameWorld.ErrLog(" 活动配置开始及结束时间个数不匹配! actName=%s,cfgID=%s,startHMStrList=%s,endHMStrList=%s" |
| | | % (actName, cfgID, startHMStrList, endHMStrList))
|
| | | continue
|
| | | |
| | | resetType = 0 if not hasattr(ipyData, "GetResetType") else ipyData.GetResetType() # 重置类型,0-0点重置;1-5点重置
|
| | | if resetType == 1:
|
| | | startDayDate = datetime.datetime.strptime("%s 05:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
|
| | | endDayDate = datetime.datetime.strptime("%s 05:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) # 结束日期5点
|
| | | else:
|
| | | startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format)
|
| | | endDayDate = datetime.datetime.strptime("%s 00:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1) # 结束日期隔天0点
|
| | | |
| | | advanceMinutes = 0 if not hasattr(ipyData, "GetAdvanceMinutes") else ipyData.GetAdvanceMinutes() # 提前通知时间,分钟,暂只支持按天的
|
| | | GameWorld.Log(" resetType=%s,startDayDate=%s,endDayDate=%s,startHMStrList=%s,endHMStrList=%s,advanceMinutes=%s" |
| | | % (resetType, startDayDate, endDayDate, startHMStrList, endHMStrList, advanceMinutes))
|
| | |
|
| | | startList = [] # [startDateTime, ...]
|
| | | endList = [] # [endDateTime, ...]
|
| | | startNotifyDict = {} # {notifyDateTime:notifyInfo, ...}
|
| | | endNotifyDict = {} # {notifyDateTime:notifyInfo, ...}
|
| | | loopNotifyDict = {} # {notifyDateTime:notifyInfo, ...}
|
| | | isActivity = False # 有需要处理开关时间的(开始、结束)
|
| | | isNotify = False
|
| | | isAdvanceNotice = False
|
| | | # 没配置时分的代表全天, 只要开始或结束时分没配都算
|
| | | if not startHMStrList or not endHMStrList:
|
| | | startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format) # 开始天0点
|
| | | endDayDate = datetime.datetime.strptime("%s 00:00:00" % (endDateStr), ChConfig.TYPE_Time_Format) + datetime.timedelta(days=1) # 结束天隔天0点
|
| | | startDateTime = startDayDate
|
| | | endDateTime = endDayDate
|
| | | startList.append(startDateTime)
|
| | | endList.append(endDateTime)
|
| | | # 同一个活动类型是不允许时间上配置有重叠的,所以一个活动类型满足活动中的时间的有且仅有一条配置
|
| | | # 策划可能同时配置多个时间,但是活动中的有且仅有一条配置
|
| | | if startDayDate <= curDateTime <= endDayDate:
|
| | | needStartList.append(startDateTime)
|
| | | needEndList.append(endDateTime)
|
| | |
| | |
|
| | | # 每天按时段开启的,支持多时段
|
| | | else:
|
| | | startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format) # 开始天0点
|
| | | endDayDate = datetime.datetime.strptime("%s 23:59:59" % (endDateStr), ChConfig.TYPE_Time_Format) # 结束天23点59分59秒
|
| | | if startDayDate <= curDateTime <= endDayDate:
|
| | | for hmIndex, startHMStr in enumerate(startHMStrList):
|
| | | endHMStr = endHMStrList[hmIndex]
|
| | |
| | | needEndList.append(endDateTime)
|
| | | isActivity = True
|
| | |
|
| | | if advanceMinutes and startDayDate:
|
| | | advanceNoticeDateTime = startDayDate + datetime.timedelta(minutes=-advanceMinutes)
|
| | | if advanceNoticeDateTime.year == curDateTime.year and advanceNoticeDateTime.month == curDateTime.month and advanceNoticeDateTime.day == curDateTime.day:
|
| | | isAdvanceNotice = True
|
| | | GameWorld.Log(" advanceNoticeDateTime=%s,isAdvanceNotice=%s" % (advanceNoticeDateTime, isAdvanceNotice))
|
| | | GameWorld.Log(" startList=%s" % (startList))
|
| | | GameWorld.Log(" end List=%s" % (endList))
|
| | | GameWorld.Log(" needStartList=%s" % (needStartList))
|
| | | GameWorld.Log(" need EndList=%s" % (needEndList))
|
| | | |
| | | for dtIndex, startDateTime in enumerate(startList):
|
| | | endDateTime = endList[dtIndex]
|
| | | # 广播 - 相对实际开始时间
|
| | | for notifyMinute, notifyInfo in notifyInfoDictStart.items():
|
| | | notifyDateTime = startDateTime + datetime.timedelta(minutes=notifyMinute)
|
| | | if notifyDateTime.year == curDateTime.year and notifyDateTime.month == curDateTime.month and notifyDateTime.day == curDateTime.day:
|
| | | needNotifyDict[notifyDateTime] = notifyInfo
|
| | | startNotifyDict[notifyDateTime] = notifyInfo
|
| | | isNotify = True
|
| | |
|
| | | # 广播 - 相对实际结束时间
|
| | | for notifyMinute, notifyInfo in notifyInfoDictEnd.items():
|
| | | notifyDateTime = endDateTime + datetime.timedelta(minutes=notifyMinute)
|
| | | if notifyDateTime.year == curDateTime.year and notifyDateTime.month == curDateTime.month and notifyDateTime.day == curDateTime.day:
|
| | | needNotifyDict[notifyDateTime] = notifyInfo
|
| | | endNotifyDict[notifyDateTime] = notifyInfo
|
| | | isNotify = True
|
| | | |
| | | if not isActivity and not isNotify:
|
| | | |
| | | # 广播 - 循环广播
|
| | | if notifyInfoLoopInfo and len(notifyInfoLoopInfo) == 2:
|
| | | loopMinutes, loopNotifyKey = notifyInfoLoopInfo
|
| | | notifyInfo = [loopNotifyKey, []] # 循环广播的默认无参数,不做支持
|
| | | loopCount, loopMaxCount = 0, 100
|
| | | while loopMinutes and loopNotifyKey and loopCount < loopMaxCount:
|
| | | loopCount += 1
|
| | | notifyDateTime = startDateTime + datetime.timedelta(minutes=loopMinutes*loopCount)
|
| | | if notifyDateTime >= endDateTime:
|
| | | break
|
| | | if notifyDateTime.year == curDateTime.year and notifyDateTime.month == curDateTime.month and notifyDateTime.day == curDateTime.day:
|
| | | loopNotifyDict[notifyDateTime] = notifyInfo
|
| | | isNotify = True
|
| | | |
| | | if startNotifyDict or endNotifyDict or loopNotifyDict:
|
| | | GameWorld.Log(" startNotifyDict: minutes=%s, %s" % (notifyInfoDictStart.keys(), startNotifyDict))
|
| | | GameWorld.Log(" end NotifyDict: minutes=%s, %s" % (notifyInfoDictEnd.keys(), endNotifyDict))
|
| | | GameWorld.Log(" loop NotifyDict: lopInfo=%s, %s" % (notifyInfoLoopInfo, loopNotifyDict.keys()))
|
| | | needNotifyDict.update(startNotifyDict)
|
| | | needNotifyDict.update(endNotifyDict)
|
| | | needNotifyDict.update(loopNotifyDict)
|
| | | |
| | | if not isActivity and not isNotify and not isAdvanceNotice:
|
| | | continue
|
| | |
|
| | | GameWorld.Log(" 本日需要处理的运营活动信息: actName=%s,cfgID=%s,actMark=%s" % (actName, ipyData.GetCfgID(), ipyData.GetActMark()))
|
| | | if isActivity:
|
| | | GameWorld.Log(" 需要处理的运营活动信息: cfgID=%s,isAdvanceNotice=%s,isActivity=%s,isNotify=%s" % (cfgID, isAdvanceNotice, isActivity, isNotify))
|
| | | # 当天有需要激活活动或者提前预告活动的取开始时间较早的为准
|
| | | if isActivity or isAdvanceNotice:
|
| | | if not activityIpyData or activityIpyData.GetStartDate() < ipyData.GetStartDate():
|
| | | activityIpyData = ipyData
|
| | | activityInfoDict = {ShareDefine.ActKey_CfgID:cfgID}
|
| | | |
| | | if startDayDate <= curDateTime < endDayDate:
|
| | | dayIndex = 0
|
| | | 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
|
| | | activityInfoDict[ShareDefine.ActKey_ID] = actID
|
| | | GameWorld.Log(" isDayRest=%s,actIDDateTime=%s,actID=%s" % (isDayRest, actIDDateTime, actID))
|
| | | |
| | | needStartList.sort()
|
| | | needEndList.sort()
|
| | | |
| | | mapServerOperationActionDict[actName] = activityInfoDict
|
| | | GameWorld.Log(" activityInfoDict=%s" % (activityInfoDict))
|
| | |
|
| | | if activityIpyData or needStartList or needEndList or needNotifyDict:
|
| | | # activityIpyData 可能为None
|
| | | operationActionDict[actName] = [activityIpyData, needStartList, needEndList, needNotifyDict]
|
| | | # 新增运营活动只要在此处添加同步MapServer所需要的数据字典即可,其他逻辑均为公共逻辑
|
| | | mapServerOperationActionDict[actName] = __GetOperationActionMapServerInfoDict(curDateTime, actName, activityIpyData)
|
| | |
|
| | | OperationActionInfo = IpyGameDataPY.SetConfigEx(key, [openServerDay, operationActionDict, mapServerOperationActionDict])
|
| | | OperationActionInfo = IpyGameDataPY.SetConfigEx(key, [reloadSign, operationActionDict, mapServerOperationActionDict])
|
| | |
|
| | | GameWorld.Log("本日运营活动信息加载完毕!isRefreshState=%s" % isRefreshState)
|
| | | GameWorld.Log("本日运营活动信息加载完毕!reloadSign=%s,isRefreshState=%s" % (reloadSign, isRefreshState))
|
| | | GameWorld.Log(" operationActionDict=%s" % operationActionDict)
|
| | | GameWorld.Log(" mapServerOperationActionDict=%s" % mapServerOperationActionDict)
|
| | | |
| | | GameWorld.Log("=============================================================")
|
| | | if isRefreshState:
|
| | | Dispose_OperationActionState(True)
|
| | |
|
| | |
| | | if isGeneral:
|
| | | curServerActIpyDataList += generalIpyDataList
|
| | | return curServerActIpyDataList
|
| | |
|
| | | def __GetOperationActionMapServerInfoDict(curDateTime, actName, ipyData):
|
| | | ## 获取运营活动同步到地图服务器的信息字典 |
| | | if not ipyData:
|
| | | return {}
|
| | | |
| | | startDateStr = ipyData.GetStartDate()
|
| | | startDayDate = datetime.datetime.strptime("%s 00:00:00" % (startDateStr), ChConfig.TYPE_Time_Format) # 开始天0点
|
| | | dayIndex = (curDateTime - startDayDate).days # 当前日期在活动期间的天索引
|
| | | if dayIndex < 0:
|
| | | GameWorld.DebugLog(" 不处理运营地图数据: startDateStr=%s,curDateTime=%s,startDayDate=%s,dayIndex=%s" |
| | | % (startDateStr, curDateTime, startDayDate, dayIndex))
|
| | | return {}
|
| | | |
| | | actID = int(time.mktime(startDayDate.timetuple()))
|
| | | |
| | | mapServerInfoDict = {}
|
| | | # 多倍经验活动
|
| | | if actName == ShareDefine.OperationActionName_ExpRate:
|
| | | mapServerInfoDict = {ShareDefine.ActKey_LVLimit:ipyData.GetLVLimit(),
|
| | | ShareDefine.ActKey_AddExpRate:ipyData.GetAddExpRate()}
|
| | | # 消费返利活动
|
| | | elif actName == ShareDefine.OperationActionName_CostRebate:
|
| | | isDayReset = ipyData.GetIsDayReset()
|
| | | if isDayReset:
|
| | | # 每天重置的活动ID取当天的time值
|
| | | actIDDateStr = "%d-%d-%d 00:00:00" % (curDateTime.year, curDateTime.month, curDateTime.day)
|
| | | actIDDateTime = datetime.datetime.strptime(actIDDateStr, ChConfig.TYPE_Time_Format)
|
| | | actID = int(time.mktime(actIDDateTime.timetuple()))
|
| | | templateIDList = ipyData.GetTemplateIDList()
|
| | | templateID = templateIDList[-1] if dayIndex >= len(templateIDList) else templateIDList[dayIndex]
|
| | | mapServerInfoDict = {ShareDefine.ActKey_ID:actID,
|
| | | ShareDefine.ActKey_StartDate:ipyData.GetStartDate(),
|
| | | ShareDefine.ActKey_EndDate:ipyData.GetEndDate(),
|
| | | ShareDefine.ActKey_LVLimit:ipyData.GetLVLimit(),
|
| | | ShareDefine.ActKey_IsDayReset:ipyData.GetIsDayReset(),
|
| | | ShareDefine.ActKey_TemplateID:templateID,
|
| | | ShareDefine.ActKey_TemplateIDList:templateIDList}
|
| | | # 限时特惠活动
|
| | | elif actName == ShareDefine.OperationActionName_SpringSale:
|
| | | isDayReset = ipyData.GetIsDayReset()
|
| | | if isDayReset:
|
| | | # 每天重置的活动ID取当天的time值
|
| | | actIDDateStr = "%d-%d-%d 00:00:00" % (curDateTime.year, curDateTime.month, curDateTime.day)
|
| | | actIDDateTime = datetime.datetime.strptime(actIDDateStr, ChConfig.TYPE_Time_Format)
|
| | | actID = int(time.mktime(actIDDateTime.timetuple()))
|
| | | shopTypeList = ipyData.GetShopTypeList()
|
| | | todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
|
| | | mapServerInfoDict = {ShareDefine.ActKey_ID:actID,
|
| | | ShareDefine.ActKey_CfgID:ipyData.GetCfgID(), |
| | | ShareDefine.ActKey_ShopTypeList:todayShopType}
|
| | | # Boss复活活动
|
| | | elif actName == ShareDefine.OperationActionName_BossReborn:
|
| | | mapServerInfoDict = {ShareDefine.ActKey_ID:actID,
|
| | | ShareDefine.ActKey_TemplateID:ipyData.GetTemplateID(),
|
| | | ShareDefine.ActKey_StartDate:ipyData.GetStartDate(),
|
| | | ShareDefine.ActKey_EndDate:ipyData.GetEndDate(),
|
| | | ShareDefine.ActKey_LVLimit:ipyData.GetLVLimit(),}
|
| | | # 限时礼包活动
|
| | | elif actName == ShareDefine.OperationActionName_FlashGiftbag:
|
| | | isDayReset = ipyData.GetIsDayReset()
|
| | | if isDayReset:
|
| | | # 每天重置的活动ID取当天的time值
|
| | | actIDDateStr = "%d-%d-%d 00:00:00" % (curDateTime.year, curDateTime.month, curDateTime.day)
|
| | | actIDDateTime = datetime.datetime.strptime(actIDDateStr, ChConfig.TYPE_Time_Format)
|
| | | actID = int(time.mktime(actIDDateTime.timetuple()))
|
| | | giftbagTypeList = ipyData.GetGiftbagTypeList()
|
| | | todayGiftbag = giftbagTypeList[-1] if dayIndex >= len(giftbagTypeList) else giftbagTypeList[dayIndex]
|
| | | mapServerInfoDict = {ShareDefine.ActKey_ID:actID,
|
| | | ShareDefine.ActKey_CfgID:ipyData.GetCfgID(), |
| | | ShareDefine.ActKey_GiftbagTypeList:todayGiftbag}
|
| | | # 仙界盛典活动
|
| | | elif actName == ShareDefine.OperationActionName_FairyCeremony:
|
| | | mapServerInfoDict = {ShareDefine.ActKey_ID:actID}
|
| | | # 多倍修行点活动
|
| | | if actName == ShareDefine.OperationActionName_RealmPoint:
|
| | | mapServerInfoDict = {ShareDefine.ActKey_LVLimit:ipyData.GetLVLimit(),
|
| | | ShareDefine.ActKey_RealmPointMulti:ipyData.GetMultiple(),
|
| | | ShareDefine.ActKey_StartDate:ipyData.GetStartDate(),
|
| | | ShareDefine.ActKey_EndDate:ipyData.GetEndDate(),}
|
| | | return mapServerInfoDict
|
| | |
|
| | | def Dispose_OperationActionState(reloadRefresh=False):
|
| | | # 运营活动状态处理, 每天0点会强制同步当天的运营活动详情到地图服务器
|
| | |
| | | continue
|
| | | #更新字典值
|
| | | gameWorld.SetDict(dictName, state)
|
| | | sendMapServerMsgDict = mapServerInfoDict.get(actName, {}) if state else {}
|
| | | sendMapServerMsgDict = mapServerInfoDict.get(actName, {})
|
| | |
|
| | | dbOperationActIDKey = PlayerDBGSEvent.Def_OperationActID % actName
|
| | | curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
|
| | |
| | | ("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":(
|
| | |
| | | ("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", "Multiple", 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.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.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 # 倍数
|
| | |
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|
| | | ActKey_State = "State" # 活动状态 0-未开启, >0开启中,也代表当日的第几个时间段
|
| | | ActKey_CfgID = "CfgID" # 活动表配置ID
|
| | | ActKey_StartDate = "StartDate" # 开始日期 y-m-d
|
| | | ActKey_EndDate = "EndDate" # 结束日期 y-m-d
|
| | | ActKey_LVLimit = "LVLimit" # 限制玩家等级
|
| | |
|
| | | ActKey_AddExpRate = "AddExpRate" # 多倍经验增加的经验倍率
|
| | | ActKey_IsDayReset = "IsDayReset" # 消费返利是否每天重置
|
| | | ActKey_TemplateID = "TemplateID" # 消费返利今日模板ID
|
| | | ActKey_TemplateIDList = "TemplateIDList" # 消费返利模板ID列表
|
| | | ActKey_ShopTypeList = "ShopTypeList" # 限时特惠商店类型
|
| | | ActKey_DayIndex = "DayIndex" # 活动表配置ID
|
| | | ActKey_WorldLV = "WorldLV" # 活动开启时世界等级
|
| | | ActKey_GiftbagTypeList = "GiftbagTypeList" # 限时礼包ID列表
|
| | | ActKey_RealmPointMulti = "RealmPointMulti" # X倍修行点
|
| | |
|
| | | #答题类型枚举
|
| | | Def_Game_ExamTypeList = range(1, 4 + 1)
|
| | |
| | | import PlayerRune
|
| | | import GameFuncComm
|
| | | import PlayerFairyCeremony
|
| | | import PlayerSpringSale
|
| | | import PyGameData
|
| | |
|
| | | import random
|
| | |
| | | if not state:
|
| | | GameWorld.DebugLog("限时特惠非活动中!state=%s" % (state), curPlayer.GetPlayerID())
|
| | | return
|
| | | shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, [])
|
| | | shopTypeList = PlayerSpringSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | if not shopTypeList:
|
| | | return
|
| | | actShopType = shopTypeList[-1] if state > len(shopTypeList) else shopTypeList[state - 1]
|
| | |
| | | ("char", "EndDate", 0),
|
| | | ("list", "StartTimeList", 0),
|
| | | ("list", "EndTimeList", 0),
|
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "ShopTypeList", 0),
|
| | |
| | | ("char", "EndDate", 0),
|
| | | ("list", "StartTimeList", 0),
|
| | | ("list", "EndTimeList", 0),
|
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "GiftbagList", 0),
|
| | | ("list", "GiftbagTypeList", 0),
|
| | | ),
|
| | |
|
| | | "FlashGiftbag":(
|
| | |
| | | ("char", "NotifyKey", 0),
|
| | | ),
|
| | |
|
| | | "ActExpRate":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("DWORD", "AddExpRate", 0),
|
| | | ),
|
| | |
|
| | | "ActCostRebate":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "TemplateIDList", 0),
|
| | | ),
|
| | |
|
| | | "CostRebateTemplate":(
|
| | | ("DWORD", "TemplateID", 1),
|
| | | ("DWORD", "NeedCostGold", 0),
|
| | |
| | | ("char", "NotifyKey", 0),
|
| | | ),
|
| | |
|
| | | "ActBossReborn":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("char", "StartDate", 0),
|
| | | ("char", "EndDate", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "TemplateID", 0),
|
| | | ),
|
| | |
|
| | | "BossReborn":(
|
| | | ("BYTE", "TemplateID", 1),
|
| | | ("BYTE", "ID", 1),
|
| | | ("DWORD", "TotalTimes", 0),
|
| | | ("WORD", "SingleTimes", 0),
|
| | | ("list", "Reward", 0),
|
| | | ),
|
| | |
|
| | | "ActRealmPoint":(
|
| | | ("DWORD", "CfgID", 1),
|
| | | ("WORD", "Multiple", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ),
|
| | |
|
| | | "TrialExchange":(
|
| | |
| | | self.EndDate = ""
|
| | | self.StartTimeList = []
|
| | | self.EndTimeList = []
|
| | | self.AdvanceMinutes = 0
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.ShopTypeList = [] |
| | |
| | | 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 GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetShopTypeList(self): return self.ShopTypeList # 商店类型列表 |
| | |
| | | self.EndDate = ""
|
| | | self.StartTimeList = []
|
| | | self.EndTimeList = []
|
| | | self.AdvanceMinutes = 0
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.GiftbagList = [] |
| | | self.GiftbagTypeList = [] |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | |
| | | 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 GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetGiftbagList(self): return self.GiftbagList # 礼包模板类型列表 |
| | | def GetGiftbagTypeList(self): return self.GiftbagTypeList # 礼包类型列表 |
| | | |
| | | # 限时礼包模板表 |
| | | class IPY_FlashGiftbag(): |
| | |
| | | def GetMainItemID(self): return self.MainItemID # 标的物品ID
|
| | | def GetNotifyKey(self): return self.NotifyKey # 全服广播key,默认两个参数(玩家名, 档位额度) |
| | | |
| | | # 双倍经验活动表 |
| | | class IPY_ActExpRate(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.LVLimit = 0
|
| | | self.AddExpRate = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetAddExpRate(self): return self.AddExpRate # 经验倍率加成,万分率 |
| | | |
| | | # 消费返利活动表 |
| | | class IPY_ActCostRebate(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.TemplateIDList = [] |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetIsDayReset(self): return self.IsDayReset # 是否每天重置
|
| | | def GetTemplateIDList(self): return self.TemplateIDList # 模板ID列表 |
| | | |
| | | # 消费返利模板表 |
| | | class IPY_CostRebateTemplate(): |
| | | |
| | |
| | | def GetAwardItemList(self): return self.AwardItemList # 返利物品信息列表 [(物品ID,个数,是否绑定),...]
|
| | | def GetNotifyKey(self): return self.NotifyKey # 全服广播key,默认两个参数(玩家名, 档位额度) |
| | | |
| | | # BOSS复活活动时间表 |
| | | class IPY_ActBossReborn(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.StartDate = ""
|
| | | self.EndDate = ""
|
| | | self.LVLimit = 0
|
| | | self.TemplateID = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetStartDate(self): return self.StartDate # 开启日期
|
| | | def GetEndDate(self): return self.EndDate # 结束日期
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级
|
| | | def GetTemplateID(self): return self.TemplateID # 模板编号 |
| | | |
| | | # BOSS复活表 |
| | | class IPY_BossReborn(): |
| | | |
| | |
| | | def GetTotalTimes(self): return self.TotalTimes # 可完成的总次数,0表示不限次数
|
| | | def GetSingleTimes(self): return self.SingleTimes # 单次领奖需要的次数
|
| | | def GetReward(self): return self.Reward # 奖励物品ID1 |
| | | |
| | | # 多倍修行点活动时间表 |
| | | class IPY_ActRealmPoint(): |
| | | |
| | | def __init__(self): |
| | | self.CfgID = 0
|
| | | self.Multiple = 0
|
| | | self.LVLimit = 0 |
| | | return |
| | | |
| | | def GetCfgID(self): return self.CfgID # 配置ID
|
| | | def GetMultiple(self): return self.Multiple # 倍数
|
| | | def GetLVLimit(self): return self.LVLimit # 限制等级 |
| | | |
| | | # 宗门试炼兑换表 |
| | | class IPY_TrialExchange(): |
| | |
| | | self.ipyActFlashGiftbagLen = len(self.ipyActFlashGiftbagCache)
|
| | | self.ipyFlashGiftbagCache = self.__LoadFileData("FlashGiftbag", IPY_FlashGiftbag)
|
| | | self.ipyFlashGiftbagLen = len(self.ipyFlashGiftbagCache)
|
| | | self.ipyActExpRateCache = self.__LoadFileData("ActExpRate", IPY_ActExpRate)
|
| | | self.ipyActExpRateLen = len(self.ipyActExpRateCache)
|
| | | self.ipyActCostRebateCache = self.__LoadFileData("ActCostRebate", IPY_ActCostRebate)
|
| | | self.ipyActCostRebateLen = len(self.ipyActCostRebateCache)
|
| | | self.ipyCostRebateTemplateCache = self.__LoadFileData("CostRebateTemplate", IPY_CostRebateTemplate)
|
| | | self.ipyCostRebateTemplateLen = len(self.ipyCostRebateTemplateCache)
|
| | | self.ipyActBossRebornCache = self.__LoadFileData("ActBossReborn", IPY_ActBossReborn)
|
| | | self.ipyActBossRebornLen = len(self.ipyActBossRebornCache)
|
| | | self.ipyBossRebornCache = self.__LoadFileData("BossReborn", IPY_BossReborn)
|
| | | self.ipyBossRebornLen = len(self.ipyBossRebornCache)
|
| | | self.ipyActRealmPointCache = self.__LoadFileData("ActRealmPoint", IPY_ActRealmPoint)
|
| | | self.ipyActRealmPointLen = len(self.ipyActRealmPointCache)
|
| | | self.ipyTrialExchangeCache = self.__LoadFileData("TrialExchange", IPY_TrialExchange)
|
| | | self.ipyTrialExchangeLen = len(self.ipyTrialExchangeCache)
|
| | | self.ipyAllPeoplePartyCache = self.__LoadFileData("AllPeopleParty", IPY_AllPeopleParty)
|
| | |
| | | def GetActFlashGiftbagByIndex(self, index): return self.ipyActFlashGiftbagCache[index]
|
| | | def GetFlashGiftbagCount(self): return self.ipyFlashGiftbagLen
|
| | | def GetFlashGiftbagByIndex(self, index): return self.ipyFlashGiftbagCache[index]
|
| | | def GetActExpRateCount(self): return self.ipyActExpRateLen
|
| | | def GetActExpRateByIndex(self, index): return self.ipyActExpRateCache[index]
|
| | | def GetActCostRebateCount(self): return self.ipyActCostRebateLen
|
| | | def GetActCostRebateByIndex(self, index): return self.ipyActCostRebateCache[index]
|
| | | def GetCostRebateTemplateCount(self): return self.ipyCostRebateTemplateLen
|
| | | def GetCostRebateTemplateByIndex(self, index): return self.ipyCostRebateTemplateCache[index]
|
| | | def GetActBossRebornCount(self): return self.ipyActBossRebornLen
|
| | | def GetActBossRebornByIndex(self, index): return self.ipyActBossRebornCache[index]
|
| | | def GetBossRebornCount(self): return self.ipyBossRebornLen
|
| | | def GetBossRebornByIndex(self, index): return self.ipyBossRebornCache[index]
|
| | | def GetActRealmPointCount(self): return self.ipyActRealmPointLen
|
| | | def GetActRealmPointByIndex(self, index): return self.ipyActRealmPointCache[index]
|
| | | def GetTrialExchangeCount(self): return self.ipyTrialExchangeLen
|
| | | def GetTrialExchangeByIndex(self, index): return self.ipyTrialExchangeCache[index]
|
| | | def GetAllPeoplePartyCount(self): return self.ipyAllPeoplePartyLen
|
| | |
| | | actRealmPointInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_RealmPoint, {})# 多倍修行点活动
|
| | | if not actRealmPointInfo:
|
| | | return multiple
|
| | | if actRealmPointInfo.get(ShareDefine.ActKey_State) \
|
| | | and curPlayer.GetLV() >= actRealmPointInfo.get(ShareDefine.ActKey_LVLimit, 0):
|
| | | #从开始天的5点到结束天的5点
|
| | | startData = GameWorld.GetDateTimeByStr(actRealmPointInfo[ShareDefine.ActKey_StartDate], ChConfig.TYPE_Time_Format_Day)
|
| | | endData = GameWorld.GetDateTimeByStr(actRealmPointInfo[ShareDefine.ActKey_EndDate], ChConfig.TYPE_Time_Format_Day)
|
| | | curTime = GameWorld.GetCurrentTime()
|
| | | |
| | | curHour = GameWorld.GetCurrentTime().hour
|
| | | if curTime.year == startData.year and curTime.month == startData.month and curTime.day == startData.day:
|
| | | if 0<=curHour<5:
|
| | | #GameWorld.DebugLog('多倍修行点开始天的0-5点不生效')
|
| | | return multiple
|
| | | if curTime.year == endData.year and curTime.month == endData.month and curTime.day == endData.day:
|
| | | if curHour >=5:
|
| | | #GameWorld.DebugLog('多倍修行点结束天的5点之后不生效')
|
| | | return multiple
|
| | | multiple = actRealmPointInfo.get(ShareDefine.ActKey_RealmPointMulti, 1)
|
| | | return multiple
|
| | | if not actRealmPointInfo.get(ShareDefine.ActKey_State):
|
| | | return multiple
|
| | | actRealmPointIpyData = IpyGameDataPY.GetIpyGameData("ActRealmPoint", actRealmPointInfo.get(ShareDefine.ActKey_CfgID, 0))
|
| | | if not actRealmPointIpyData:
|
| | | return multiple
|
| | | if curPlayer.GetLV() < actRealmPointIpyData.GetLVLimit():
|
| | | return multiple
|
| | | return actRealmPointIpyData.GetMultiple()
|
| | |
|
| | | ## 同步活跃度信息
|
| | | # @param curPlayer
|
| | |
| | | if bossRebornID == playerBossRebornID:
|
| | | #GameWorld.DebugLog("BOSS复活活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | | templateID = actBossRebornInfo.get(ShareDefine.ActKey_TemplateID, 0)
|
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0))
|
| | | if not actBossIpyData:
|
| | | return
|
| | | templateID = actBossIpyData.GetTemplateID()
|
| | | playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BossRebornTemplateID)
|
| | |
|
| | | GameWorld.DebugLog("BOSS复活重置! costRebateID=%s,playerCostRebateID=%s,state=%s,templateID=%s,playerTemplateID=%s"
|
| | |
| | | state = actBossRebornInfo.get(ShareDefine.ActKey_State, 0)
|
| | | if not state:
|
| | | return
|
| | | templateID = actBossRebornInfo.get(ShareDefine.ActKey_TemplateID, 0)
|
| | | actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0))
|
| | | if not actBossIpyData:
|
| | | return
|
| | | templateID = actBossIpyData.GetTemplateID()
|
| | | if not templateID:
|
| | | return
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("BossReborn", {'TemplateID':templateID}, True)
|
| | |
| | | return
|
| | | actInfo = ChPyNetSendPack.tagMCBossRebornInfo()
|
| | | actInfo.Clear()
|
| | | actInfo.StartDate = actBossRebornInfo.get(ShareDefine.ActKey_StartDate, "")
|
| | | actInfo.EndtDate = actBossRebornInfo.get(ShareDefine.ActKey_EndDate, "")
|
| | | actInfo.LimitLV = actBossRebornInfo.get(ShareDefine.ActKey_LVLimit, 0)
|
| | | actInfo.StartDate = actBossIpyData.GetStartDate()
|
| | | actInfo.EndtDate = actBossIpyData.GetEndDate()
|
| | | actInfo.LimitLV = actBossIpyData.GetLVLimit()
|
| | | actInfo.TaskInfo = []
|
| | | for ipyData in ipyDataList:
|
| | | taskInfo = ChPyNetSendPack.tagMCBossRebornTaskInfo()
|
| | |
| | | fightExpRate += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FightExpRate) # VIP加成
|
| | |
|
| | | actExpRateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ExpRate, {})# 多倍经验活动加成
|
| | | if not PlayerTJG.GetIsTJG(curPlayer) and actExpRateInfo.get(ShareDefine.ActKey_State) \
|
| | | and curPlayer.GetLV() >= actExpRateInfo.get(ShareDefine.ActKey_LVLimit, 0):
|
| | | fightExpRate += actExpRateInfo.get(ShareDefine.ActKey_AddExpRate, 0)
|
| | | |
| | | if not PlayerTJG.GetIsTJG(curPlayer) and actExpRateInfo.get(ShareDefine.ActKey_State):
|
| | | actExpIpyData = IpyGameDataPY.GetIpyGameData("ActExpRate", actExpRateInfo.get(ShareDefine.ActKey_CfgID))
|
| | | if actExpIpyData and curPlayer.GetLV() >= actExpIpyData.GetLVLimit():
|
| | | fightExpRate += actExpIpyData.GetAddExpRate()
|
| | | |
| | | if curPlayer.GetMapID() not in [ChConfig.Def_FBMapID_FamilyInvade]: #守卫人皇不加组队加成
|
| | | fightExpRate += curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_TeamExpRate) # 组队
|
| | |
|
| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | | def GetTemplateID(cfgID, dayIndex):
|
| | | if cfgID == None or dayIndex == None:
|
| | | return 0
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActCostRebate", cfgID)
|
| | | if not ipyData:
|
| | | return 0
|
| | | templateIDList = ipyData.GetTemplateIDList()
|
| | | templateID = templateIDList[-1] if dayIndex >= len(templateIDList) else templateIDList[dayIndex]
|
| | | return templateID
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | isReset = __CheckPlayerCostRebateAction(curPlayer)
|
| | |
| | | #GameWorld.DebugLog("消费返利活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | templateID = actCostRebateInfo.get(ShareDefine.ActKey_TemplateID, 0)
|
| | | templateID = GetTemplateID(actCostRebateInfo.get(ShareDefine.ActKey_CfgID, 0), actCostRebateInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateTemplateID)
|
| | |
|
| | | GameWorld.DebugLog("消费返利重置! costRebateID=%s,playerCostRebateID=%s,state=%s,templateID=%s,playerTemplateID=%s"
|
| | |
| | | return
|
| | |
|
| | | actID = actCostRebateInfo.get(ShareDefine.ActKey_ID)
|
| | | templateID = actCostRebateInfo.get(ShareDefine.ActKey_TemplateID)
|
| | | templateID = GetTemplateID(actCostRebateInfo.get(ShareDefine.ActKey_CfgID, 0), actCostRebateInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | if not actID or not templateID:
|
| | | GameWorld.ErrLog("消费返利活动数据异常!actID=%s,templateID=%s" % (actID, templateID), curPlayer.GetPlayerID())
|
| | | return
|
| | |
| | | actCostRebateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_CostRebate, {})
|
| | | costRebateID = actCostRebateInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actCostRebateInfo.get(ShareDefine.ActKey_State, 0)
|
| | | templateID = actCostRebateInfo.get(ShareDefine.ActKey_TemplateID, 0)
|
| | | templateID = GetTemplateID(actCostRebateInfo.get(ShareDefine.ActKey_CfgID, 0), actCostRebateInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | if not state or not templateID:
|
| | | GameWorld.DebugLog("没有消费返利活动,无法领奖!state=%s,templateID=%s" % (state, templateID), playerID)
|
| | | return
|
| | |
| | | if not actCostRebateInfo.get(ShareDefine.ActKey_State):
|
| | | return
|
| | |
|
| | | templateIDList = actCostRebateInfo.get(ShareDefine.ActKey_TemplateIDList)
|
| | | cfgID = actCostRebateInfo.get(ShareDefine.ActKey_CfgID)
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActCostRebate", cfgID)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | templateIDList = ipyData.GetTemplateIDList()
|
| | | if not templateIDList:
|
| | | return
|
| | |
|
| | | actInfo = ChPyNetSendPack.tagMCCostRebateInfo()
|
| | | actInfo.StartDate = actCostRebateInfo.get(ShareDefine.ActKey_StartDate, "")
|
| | | actInfo.EndtDate = actCostRebateInfo.get(ShareDefine.ActKey_EndDate, "")
|
| | | actInfo.LimitLV = actCostRebateInfo.get(ShareDefine.ActKey_LVLimit, 0)
|
| | | actInfo.IsDayReset = actCostRebateInfo.get(ShareDefine.ActKey_IsDayReset, 0)
|
| | | actInfo.StartDate = ipyData.GetStartDate()
|
| | | actInfo.EndtDate = ipyData.GetEndDate()
|
| | | actInfo.LimitLV = ipyData.GetLVLimit()
|
| | | actInfo.IsDayReset = ipyData.GetIsDayReset()
|
| | | actInfo.AwardDayInfo = []
|
| | | for templateID in templateIDList:
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataList("CostRebateTemplate", templateID)
|
| | |
| | | import ChConfig
|
| | |
|
| | |
|
| | | def GetGiftbagTypeList(cfgID, dayIndex):
|
| | | if cfgID == None or dayIndex == None:
|
| | | return []
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFlashGiftbag", cfgID)
|
| | | if not ipyData:
|
| | | return []
|
| | | giftbagTypeList = ipyData.GetGiftbagTypeList()
|
| | | todayGiftbag = giftbagTypeList[-1] if dayIndex >= len(giftbagTypeList) else giftbagTypeList[dayIndex]
|
| | | return todayGiftbag
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | isReset = __CheckPlayerFlashGiftbagAction(curPlayer)
|
| | | if not isReset:
|
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashGiftbag, {})
|
| | | # 活动中同步活动信息
|
| | | if actInfo.get(ShareDefine.ActKey_State):
|
| | | SyncFlashGiftbagBuyCount(curPlayer, giftbagTypeList=actInfo.get(ShareDefine.ActKey_GiftbagTypeList, []))
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | SyncFlashGiftbagBuyCount(curPlayer, giftbagTypeList=giftbagTypeList)
|
| | | Sync_FlashGiftbagActionInfo(curPlayer)
|
| | | return
|
| | |
|
| | |
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashGiftbag, {})
|
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | giftbagTypeList = actInfo.get(ShareDefine.ActKey_GiftbagTypeList, [])
|
| | | #if not state or not giftbagTypeList:
|
| | | # return
|
| | |
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashGiftbagID) # 玩家身上的活动ID
|
| | |
|
| | |
| | | GameWorld.DebugLog("限时礼包活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashGiftbagID, actID)
|
| | | ResetGiftbagItemBuyCount(curPlayer, giftbagTypeList)
|
| | |
|
| | |
| | | DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag state is 0!", addDRDict)
|
| | | return
|
| | |
|
| | | giftbagTypeList = actInfo.get(ShareDefine.ActKey_GiftbagTypeList, [])
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | if not giftbagTypeList:
|
| | | DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag GiftbagTypeList is null!", addDRDict)
|
| | | return
|
| | |
| | | return
|
| | |
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | giftbagTypeList = actInfo.get(ShareDefine.ActKey_GiftbagTypeList, 0)
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | |
|
| | | if not cfgID or not giftbagTypeList:
|
| | | return
|
| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | | def GetShopTypeList(cfgID, dayIndex):
|
| | | if cfgID == None or dayIndex == None:
|
| | | return []
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActSpringSale", cfgID)
|
| | | if not ipyData:
|
| | | return []
|
| | | shopTypeList = ipyData.GetShopTypeList()
|
| | | todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
|
| | | return todayShopType
|
| | |
|
| | | def OnPlayerLogin(curPlayer):
|
| | | isReset = __CheckPlayerSpringSaleAction(curPlayer)
|
| | |
| | | actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_SpringSale, {})
|
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, [])
|
| | | #if not state or not shopTypeList:
|
| | | # return
|
| | |
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SpringSaleID) # 玩家身上的活动ID
|
| | |
|
| | |
| | | GameWorld.DebugLog("限时特惠活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | |
|
| | | shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleID, actID)
|
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
|
| | |
|
| | |
| | | return
|
| | |
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, 0)
|
| | | shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | |
|
| | | if not cfgID or not shopTypeList:
|
| | | return
|
| | |
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|
| | | ActKey_State = "State" # 活动状态 0-未开启, >0开启中,也代表当日的第几个时间段
|
| | | ActKey_CfgID = "CfgID" # 活动表配置ID
|
| | | ActKey_StartDate = "StartDate" # 开始日期 y-m-d
|
| | | ActKey_EndDate = "EndDate" # 结束日期 y-m-d
|
| | | ActKey_LVLimit = "LVLimit" # 限制玩家等级
|
| | |
|
| | | ActKey_AddExpRate = "AddExpRate" # 多倍经验增加的经验倍率
|
| | | ActKey_IsDayReset = "IsDayReset" # 消费返利是否每天重置
|
| | | ActKey_TemplateID = "TemplateID" # 消费返利今日模板ID
|
| | | ActKey_TemplateIDList = "TemplateIDList" # 消费返利模板ID列表
|
| | | ActKey_ShopTypeList = "ShopTypeList" # 限时特惠商店类型
|
| | | ActKey_DayIndex = "DayIndex" # 活动表配置ID
|
| | | ActKey_WorldLV = "WorldLV" # 活动开启时世界等级
|
| | | ActKey_GiftbagTypeList = "GiftbagTypeList" # 限时礼包ID列表
|
| | | ActKey_RealmPointMulti = "RealmPointMulti" # X倍修行点
|
| | |
|
| | | #答题类型枚举
|
| | | Def_Game_ExamTypeList = range(1, 4 + 1)
|