Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode
| | |
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list ShopTypeList; //商店类型列表
|
| | | dict ShopTypeList; //商店类型列表
|
| | | char MailKey; //活动更新时发送邮件key
|
| | | list MailItemPrize; //活动更新时发送邮件奖励物品
|
| | | };
|
| | |
| | | WORD AdvanceMinutes; //前端提前X分钟展示活动
|
| | | WORD LVLimit; //限制等级
|
| | | BYTE IsDayReset; //是否每天重置
|
| | | list GiftbagTypeList; //礼包类型列表
|
| | | dict GiftbagTypeList; //礼包类型列表
|
| | | char MailKey; //活动更新时发送邮件key
|
| | | list MailItemPrize; //活动更新时发送邮件奖励物品
|
| | | };
|
| | |
| | | DWORD _TemplateID; //模板ID
|
| | | DWORD NeedCostGold; //需要消费仙玉数
|
| | | BYTE AwardIndex; //返利奖励索引0~31,同个模板中不重复
|
| | | list AwardItemList; //返利物品信息列表 [(物品ID,个数,是否绑定),...]
|
| | | dict AwardItemList; //返利物品信息列表 {世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
|
| | | char NotifyKey; //全服广播key,默认两个参数(玩家名, 档位额度)
|
| | | };
|
| | |
|
| | |
| | | BYTE _ID; //活动条目ID
|
| | | DWORD TotalTimes; //可完成的总次数,0表示不限次数
|
| | | WORD SingleTimes; //单次领奖需要的次数
|
| | | list Reward; //奖励物品ID1
|
| | | dict Reward; //奖励物品ID1
|
| | | };
|
| | |
|
| | | //多倍修行点活动时间表
|
| | |
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
|
| | | OperationActionName_BossReborn, ]
|
| | | OperationActionName_BossReborn, OperationActionName_TotalRecharge,
|
| | | OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
|
| | | OperationActionName_SpringSale,]
|
| | |
|
| | | #活动信息字典key定义
|
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|
| | |
| | | Def_PDict_CostRebateTemplateID = "CostRebateTemplateID" # 玩家身上的消费返利模板ID
|
| | | Def_PDict_CostRebateGold = "CostRebateGold" # 消费返利总累计消费仙玉
|
| | | Def_PDict_CostRebateAwardRecord = "CostRebateAwardRecord" # 消费返利领奖记录
|
| | | Def_PDict_CostRebateWorldLV = "CostRebateWorldLV" #消费返利活动开启时世界等级
|
| | |
|
| | | #累计充值活动
|
| | | Def_PDict_TotalRechargeID = "TotalRechargeID" # 玩家身上的累计充值活动ID,唯一标识,取活动开始日期time值
|
| | | Def_PDict_TotalRechargeTemplateID = "TotalRechargeTemplateID" # 玩家身上的累计充值模板ID
|
| | | Def_PDict_TotalRechargeGold = "TotalRechargeGold" # 消费返利总累计充值X元
|
| | | Def_PDict_TotalRechargeAwardRecord = "TotalRechargeAwardRecord" # 累计充值领奖记录
|
| | | Def_PDict_TotalRechargeWorldLV = "TotalRechargeWorldLV" #累计充值活动开启时世界等级
|
| | |
|
| | | #限时特惠活动
|
| | | Def_PDict_SpringSaleID = "SpringSaleID" # 玩家身上的限时特惠活动ID,唯一标识,取活动开始日期time
|
| | |
| | | Def_PDict_BossRebornTemplateID = "BossRebornTemplateID" # 玩家身上的BOSS复活模板ID
|
| | | Def_PDict_BRActionCurTimes = "BRActionCurTimes_%s" #当前完成次数 参数BOSS复活活动ID
|
| | | Def_PDict_BRActionGotTimes = "BRActionGotTimes_%s" #当前已领次数 参数BOSS复活活动ID
|
| | | Def_PDict_BRActionWorldLV = "BRActionWorldLV_%s" #BOSS复活活动开启时世界等级
|
| | | Def_PDict_BRActionWorldLV = "BRActionWorldLV" #BOSS复活活动开启时世界等级
|
| | |
|
| | | #仙界盛典
|
| | | Def_PDict_FairyCeremonyID = "FairyCeremonyID" # 玩家身上的仙界盛典活动ID,唯一标识,取活动开始日期time值
|
| | |
| | | if not state:
|
| | | GameWorld.DebugLog("限时特惠非活动中!state=%s" % (state), curPlayer.GetPlayerID())
|
| | | return
|
| | | shopTypeList = PlayerSpringSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | shopTypeList = PlayerSpringSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | if not shopTypeList:
|
| | | return
|
| | | actShopType = shopTypeList[-1] if state > len(shopTypeList) else shopTypeList[state - 1]
|
| | |
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "ShopTypeList", 0),
|
| | | ("dict", "ShopTypeList", 0),
|
| | | ("char", "MailKey", 0),
|
| | | ("list", "MailItemPrize", 0),
|
| | | ),
|
| | |
| | | ("WORD", "AdvanceMinutes", 0),
|
| | | ("WORD", "LVLimit", 0),
|
| | | ("BYTE", "IsDayReset", 0),
|
| | | ("list", "GiftbagTypeList", 0),
|
| | | ("dict", "GiftbagTypeList", 0),
|
| | | ("char", "MailKey", 0),
|
| | | ("list", "MailItemPrize", 0),
|
| | | ),
|
| | |
| | | ("DWORD", "TemplateID", 1),
|
| | | ("DWORD", "NeedCostGold", 0),
|
| | | ("BYTE", "AwardIndex", 0),
|
| | | ("list", "AwardItemList", 0),
|
| | | ("dict", "AwardItemList", 0),
|
| | | ("char", "NotifyKey", 0),
|
| | | ),
|
| | |
|
| | |
| | | ("BYTE", "ID", 1),
|
| | | ("DWORD", "TotalTimes", 0),
|
| | | ("WORD", "SingleTimes", 0),
|
| | | ("list", "Reward", 0),
|
| | | ("dict", "Reward", 0),
|
| | | ),
|
| | |
|
| | | "ActRealmPoint":(
|
| | |
| | | self.AdvanceMinutes = 0
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.ShopTypeList = []
|
| | | self.ShopTypeList = {}
|
| | | self.MailKey = ""
|
| | | self.MailItemPrize = [] |
| | | return |
| | |
| | | self.AdvanceMinutes = 0
|
| | | self.LVLimit = 0
|
| | | self.IsDayReset = 0
|
| | | self.GiftbagTypeList = []
|
| | | self.GiftbagTypeList = {}
|
| | | self.MailKey = ""
|
| | | self.MailItemPrize = [] |
| | | return |
| | |
| | | self.TemplateID = 0
|
| | | self.NeedCostGold = 0
|
| | | self.AwardIndex = 0
|
| | | self.AwardItemList = []
|
| | | self.AwardItemList = {}
|
| | | self.NotifyKey = "" |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.TemplateID # 模板ID
|
| | | def GetNeedCostGold(self): return self.NeedCostGold # 需要消费仙玉数
|
| | | def GetAwardIndex(self): return self.AwardIndex # 返利奖励索引0~31,同个模板中不重复
|
| | | def GetAwardItemList(self): return self.AwardItemList # 返利物品信息列表 [(物品ID,个数,是否绑定),...]
|
| | | def GetAwardItemList(self): return self.AwardItemList # 返利物品信息列表 {世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
|
| | | def GetNotifyKey(self): return self.NotifyKey # 全服广播key,默认两个参数(玩家名, 档位额度) |
| | | |
| | | # BOSS复活活动时间表 |
| | |
| | | self.ID = 0
|
| | | self.TotalTimes = 0
|
| | | self.SingleTimes = 0
|
| | | self.Reward = [] |
| | | self.Reward = {} |
| | | return |
| | | |
| | | def GetTemplateID(self): return self.TemplateID # 模板ID
|
| | |
| | | if TotalRechargeID == playerTotalRechargeID:
|
| | | #GameWorld.DebugLog("累计充值活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeWorldLV)
|
| | | templateID = GetTemplateID(actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID, 0), actTotalRechargeInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeTemplateID)
|
| | |
|
| | |
| | | % (TotalRechargeID, playerTotalRechargeID, state, templateID, playerTemplateID), playerID)
|
| | |
|
| | | # 未领取的奖励邮件发放
|
| | | __SendTotalRechargeMail(curPlayer, playerTemplateID)
|
| | | __SendTotalRechargeMail(curPlayer, playerTemplateID, playerWorldLV)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID, TotalRechargeID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID, templateID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeWorldLV, actWorldLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord, 0)
|
| | |
|
| | |
| | | Sync_TotalRechargeInfo(curPlayer)
|
| | | return True
|
| | |
|
| | | def __SendTotalRechargeMail(curPlayer, playerTemplateID):
|
| | | def __SendTotalRechargeMail(curPlayer, playerTemplateID, playerWorldLV):
|
| | | # 未领取的奖励邮件发放
|
| | |
|
| | | if not playerTemplateID:
|
| | |
| | | continue
|
| | | awardRecord |= pow(2, awardIndex)
|
| | |
|
| | | awardItemList = ipyData.GetAwardItem().get(str(job), [])
|
| | | awardItemList = __GetItemList(ipyData.GetAwardItem(), job, playerWorldLV)
|
| | | batchPlayerIDList.append([playerID])
|
| | | batchAddItemList.append(awardItemList)
|
| | | batchParamList.append([needGold])
|
| | |
| | | PlayerControl.SendMailBatch("TotalRechargeMail", batchPlayerIDList, batchAddItemList, batchParamList)
|
| | |
|
| | | return
|
| | |
|
| | | def __GetItemList(itemDict, job, worldLV):
|
| | | #{世界等级范围:[(物品ID,个数,是否绑定), ...]},若物品ID要区分职业则配{世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
|
| | | itemList = []
|
| | | itemInfoList = GameWorld.GetDictValueByRangeKey(itemDict, worldLV, [])
|
| | | for itemInfo in itemInfoList:
|
| | | if type(itemInfo[0]) == dict:
|
| | | itemID = itemInfo[0].get(job)
|
| | | if not itemID:
|
| | | GameWorld.ErrLog('累计充值奖励未配置该职业itemDict=%s,job=%s'%(itemDict, job))
|
| | | continue
|
| | | else:
|
| | | itemID = itemInfo[0]
|
| | | itemList.append([itemID, itemInfo[1], itemInfo[2]])
|
| | | return itemList
|
| | |
|
| | | def AddTotalRechargeGold(curPlayer, addGold):
|
| | | if addGold <= 0:
|
| | |
| | | return
|
| | |
|
| | | needGold = awardIpyData.GetNeedGold()
|
| | | awardItemList = awardIpyData.GetAwardItem().get(str(curPlayer.GetJob()), [])
|
| | | actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | awardItemList = __GetItemList(ipyData.GetAwardItem(), curPlayer.GetJob(), actWorldLV)
|
| | |
|
| | | curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold)
|
| | | if curRechargeGold < needGold:
|
| | |
| | | if costRebateID == playerCostRebateID:
|
| | | #GameWorld.DebugLog("消费返利活动ID不变,不处理!", curPlayer.GetPlayerID())
|
| | | return
|
| | | |
| | | actWorldLV = actCostRebateInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateWorldLV)
|
| | | templateID = GetTemplateID(actCostRebateInfo.get(ShareDefine.ActKey_CfgID, 0), actCostRebateInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateTemplateID)
|
| | |
|
| | |
| | | % (costRebateID, playerCostRebateID, state, templateID, playerTemplateID), playerID)
|
| | |
|
| | | # 未领取的奖励邮件发放
|
| | | __SendCostRebateMail(curPlayer, playerTemplateID)
|
| | | __SendCostRebateMail(curPlayer, playerTemplateID, playerWorldLV)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateID, costRebateID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateTemplateID, templateID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateWorldLV, actWorldLV)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateGold, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_CostRebateAwardRecord, 0)
|
| | |
|
| | |
| | | Sync_CostRebateInfo(curPlayer)
|
| | | return True
|
| | |
|
| | | def __SendCostRebateMail(curPlayer, playerTemplateID):
|
| | | def __SendCostRebateMail(curPlayer, playerTemplateID, playerWorldLV):
|
| | | # 未领取的奖励邮件发放
|
| | |
|
| | | if not playerTemplateID:
|
| | |
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataList("CostRebateTemplate", playerTemplateID)
|
| | | if not ipyDataList:
|
| | | return
|
| | | |
| | | job = curPlayer.GetJob()
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | batchPlayerIDList, batchAddItemList, batchParamList = [], [], []
|
| | | awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateAwardRecord)
|
| | |
| | | continue
|
| | | awardRecord |= pow(2, awardIndex)
|
| | |
|
| | | awardItemList = ipyData.GetAwardItemList()
|
| | | awardItemList = __GetItemList(ipyData.GetAwardItemList(), job, playerWorldLV)
|
| | | batchPlayerIDList.append([playerID])
|
| | | batchAddItemList.append(awardItemList)
|
| | | batchParamList.append([needCostGold])
|
| | |
| | | PlayerControl.SendMailBatch("ConsumptionRebateMail", batchPlayerIDList, batchAddItemList, batchParamList)
|
| | |
|
| | | return
|
| | |
|
| | |
|
| | | def __GetItemList(itemDict, job, worldLV):
|
| | | #{世界等级范围:[(物品ID,个数,是否绑定), ...]},若物品ID要区分职业则配{世界等级范围:[({职业:物品ID,..},个数,是否绑定), ...]}
|
| | | itemList = []
|
| | | itemInfoList = GameWorld.GetDictValueByRangeKey(itemDict, worldLV, [])
|
| | | for itemInfo in itemInfoList:
|
| | | if type(itemInfo[0]) == dict:
|
| | | itemID = itemInfo[0].get(job)
|
| | | if not itemID:
|
| | | GameWorld.ErrLog('累计充值奖励未配置该职业itemDict=%s,job=%s'%(itemDict, job))
|
| | | continue
|
| | | else:
|
| | | itemID = itemInfo[0]
|
| | | itemList.append([itemID, itemInfo[1], itemInfo[2]])
|
| | | return itemList
|
| | |
|
| | |
|
| | | def AddCostRebateGold(curPlayer, costType, costGold, infoDict):
|
| | | if costGold <= 0:
|
| | |
| | | return
|
| | |
|
| | | needCostGold = awardIpyData.GetNeedCostGold()
|
| | | awardItemList = awardIpyData.GetAwardItemList()
|
| | | actWorldLV = actCostRebateInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | awardItemList = __GetItemList(awardIpyData.GetAwardItemList(), curPlayer.GetJob(), actWorldLV)
|
| | |
|
| | | curCostGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CostRebateGold)
|
| | | if curCostGold < needCostGold:
|
| | |
| | | import ChConfig
|
| | |
|
| | |
|
| | | def GetGiftbagTypeList(cfgID, dayIndex):
|
| | | def GetGiftbagTypeList(cfgID, dayIndex, woldLV):
|
| | | if cfgID == None or dayIndex == None:
|
| | | return []
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFlashGiftbag", cfgID)
|
| | | if not ipyData:
|
| | | return []
|
| | | giftbagTypeList = ipyData.GetGiftbagTypeList()
|
| | | giftbagTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetGiftbagTypeList(), woldLV, [])
|
| | | todayGiftbag = giftbagTypeList[-1] if dayIndex >= len(giftbagTypeList) else giftbagTypeList[dayIndex]
|
| | | return todayGiftbag
|
| | |
|
| | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | |
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashGiftbagID) # 玩家身上的活动ID
|
| | | giftbagTypeList = [] if not cfgID else GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | giftbagTypeList = [] if not cfgID else GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | isReset = False
|
| | | if actID != playerActID:
|
| | | isReset = True
|
| | |
| | | DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag state is 0!", addDRDict)
|
| | | return
|
| | |
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | giftbagTypeList = GetGiftbagTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | if not giftbagTypeList:
|
| | | DataRecordPack.DR_CTGError(curPlayer, "FlashGiftbag GiftbagTypeList is null!", addDRDict)
|
| | | return
|
| | |
| | | return
|
| | |
|
| | | giftbagID = giftbagIpyData.GetGiftbagID()
|
| | | giftItemList = giftbagIpyData.GetGiftItemList()
|
| | | giftItemList = __GetJobItemList(giftbagIpyData.GetGiftItemList(), curPlayer.GetJob()) |
| | | addDRDict.update({"giftbagID":giftbagID, "giftItemList":giftItemList})
|
| | | buyCountLimit = giftbagIpyData.GetBuyCountLimit()
|
| | | buyCount = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashGiftbagBuyCount % giftbagID)
|
| | |
| | | SyncFlashGiftbagBuyCount(curPlayer, [giftbagID])
|
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_GiftBag, actGiftbagType, False)
|
| | | return True
|
| | |
|
| | | def __GetJobItemList(itemList, job):
|
| | | jobItemList = []
|
| | | for itemID, itemCnt, isBind in itemList:
|
| | | if type(itemID) == int:
|
| | | jobItemList.append([itemID, itemCnt, isBind])
|
| | | elif job in itemID:
|
| | | jobItemList.append([itemID[job], itemCnt, isBind])
|
| | | return jobItemList
|
| | |
|
| | | def SyncFlashGiftbagBuyCount(curPlayer, syncIDList=[], giftbagTypeList=[]):
|
| | | ## 通知限时礼包玩家活动信息
|
| | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | if not cfgID:
|
| | | return
|
| | | giftbagTypeList = GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | giftbagTypeList = GetGiftbagTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | |
|
| | | if not giftbagTypeList:
|
| | | return
|
| | |
| | | giftBag.RMB = 0 if not orderIpyData else int(orderIpyData.GetPayRMBNum())
|
| | | giftBag.RMBOriginal = giftIpyData.GetOriginalRMB()
|
| | | giftBag.ItemInfo = []
|
| | | for itemID, itemCount, isBind in giftIpyData.GetGiftItemList():
|
| | | for itemID, itemCount, isBind in __GetJobItemList(orderIpyData.GetGiftItemList(), curPlayer.GetJob()):
|
| | | item = ChPyNetSendPack.tagMCFlashGiftbagItem()
|
| | | item.ItemID = itemID
|
| | | item.ItemCount = itemCount
|
| | |
| | | import GameWorld
|
| | | import ChConfig
|
| | |
|
| | | def GetShopTypeList(cfgID, dayIndex):
|
| | | def GetShopTypeList(cfgID, dayIndex, woldLV):
|
| | | if cfgID == None or dayIndex == None:
|
| | | return []
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActSpringSale", cfgID)
|
| | | if not ipyData:
|
| | | return []
|
| | | shopTypeList = ipyData.GetShopTypeList()
|
| | | shopTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetShopTypeList(), woldLV, [])
|
| | | todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
|
| | | return todayShopType
|
| | |
|
| | |
| | | actID = actInfo.get(ShareDefine.ActKey_ID, 0)
|
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | |
| | | woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SpringSaleID) # 玩家身上的活动ID
|
| | | isReset = False
|
| | | if actID != playerActID:
|
| | | isReset = True
|
| | | shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), woldLV)
|
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleID, actID)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleMailState, 0)
|
| | |
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | if not cfgID:
|
| | | return
|
| | | shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0))
|
| | | shopTypeList = GetShopTypeList(cfgID, actInfo.get(ShareDefine.ActKey_DayIndex, 0), actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | if not shopTypeList:
|
| | | return
|
| | |
|
| | |
| | | if len(startTimeList) != len(endTimeList):
|
| | | GameWorld.ErrLog("限时特惠开关时间时分配置错误!cfgID=%s" % cfgID)
|
| | | return
|
| | | |
| | | job = curPlayer.GetJob()
|
| | | openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
|
| | | packInfo = ChPyNetSendPack.tagMCSpringSaleInfo()
|
| | | packInfo.StartDate = GameWorld.GetOperationActionDateStr(springSaleIpyData.GetStartDate(), openServerDay)
|
| | |
| | | giftBag.ItemInfo = []
|
| | | itemList = [[itemIpyData.GetItemID(), itemIpyData.GetItemCnt(), itemIpyData.GetIsBind()]]
|
| | | itemList += itemIpyData.GetItemListEx()
|
| | | jobItemList = itemIpyData.GetJobItem()
|
| | | for itemID, itemCount, isBind in itemList:
|
| | | item = ChPyNetSendPack.tagMCSpringSaleItem()
|
| | | item.ItemID = itemID
|
| | | jobItemID = FunctionNPCCommon.GetShopJobItem(job, itemID, jobItemList)
|
| | | item.ItemID = jobItemID
|
| | | item.ItemCount = itemCount
|
| | | item.IsBind = isBind
|
| | | item.IsMainItem = int(itemID == itemIpyData.GetMainItemID())
|
| | | item.IsMainItem = int(itemID == FunctionNPCCommon.GetShopJobItem(job, itemIpyData.GetMainItemID(), jobItemList))
|
| | | giftBag.ItemInfo.append(item)
|
| | | giftBag.GiftItemCount = len(giftBag.ItemInfo)
|
| | | shop.GiftbagInfo.append(giftBag)
|
| | |
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
|
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
|
| | | OperationActionName_BossReborn, ]
|
| | | OperationActionName_BossReborn, OperationActionName_TotalRecharge,
|
| | | OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
|
| | | OperationActionName_SpringSale,]
|
| | |
|
| | | #活动信息字典key定义
|
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|