5956 【后端】【1.5.200】限时抢购支持对应不同的世界等级
| | |
| | |
|
| | | dbOperationActIDKey = PlayerDBGSEvent.Def_OperationActID % actName
|
| | | curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
|
| | | if state >= 1 and curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
|
| | | if curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
|
| | | PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | #记录开启时世界等级
|
| | |
| | | PlayerNewFairyCeremony.ResetNewFairyCeremony()
|
| | |
|
| | |
|
| | | if state >= 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | if actName in ShareDefine.NeedWorldLVOperationActNameList:
|
| | | actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
|
| | | sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
|
| | |
|
| | |
| | | #重置限时抢购商店全服购买次数
|
| | | if state == 0:
|
| | | return
|
| | | shopTypeList = ipyData.GetShopTypeList()
|
| | | dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
|
| | | shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
|
| | | DoResetStoreServerBuyCnt([shopType])
|
| | | dayShopRangeDict = ipyData.GetShopTypeList()
|
| | | |
| | | resetTypeList = []
|
| | | for shopTypeList in dayShopRangeDict.values():
|
| | | dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
|
| | | shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
|
| | | if shopType not in resetTypeList:
|
| | | resetTypeList.append(shopType)
|
| | | if resetTypeList:
|
| | | DoResetStoreServerBuyCnt(resetTypeList)
|
| | | return
|
| | |
|
| | | def SyncStoreServerBuyInfo(curPlayer, syncCntDict={}):
|
| | |
| | | OperationActionName_NewFairyCeremony, ] \
|
| | | + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, |
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
|
| | |
|
| | | #活动信息字典key定义
|
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|
| | |
| | | Def_Player_Dict_TrialTower_PassLV = "TrialTower_PassLV" # 试炼之塔通关层数
|
| | | Def_Player_Dict_TrialTower_LastDayPassLV = "Tower_LastDayPassLV" # 试炼之塔昨日通关层数
|
| | | #诛仙塔
|
| | | Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV" # 诛仙塔通关层数
|
| | | Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV" # 诛仙塔已通关层数
|
| | | Def_Player_Dict_ZhuXianTowerLastFloor = "ZhuXianTowerLastFloor" # 诛仙塔上次挑战层数
|
| | |
|
| | | #古神禁地
|
| | | Def_Player_Dict_GodArea_Anger = "GodArea_Anger" # 古神禁地怒气值
|
| | | Def_Player_Dict_GodArea_LastAddAngerTime = "GodArea_LastAddAngerTime" # 古神禁地上一次增加怒气值的时间
|
| | |
| | | Def_RewardType_ActLoginAwardAct, # 领取登录奖励活动奖励22
|
| | | Def_RewardType_NewFairyCRecharge, # 新仙界盛典充值大礼23
|
| | | Def_RewardType_NewFairyCParty, # 新仙界盛典全民来嗨24
|
| | | Def_RewardType_FeastWeekPartyAct, # 领取周狂欢活动奖励25
|
| | | Def_RewardType_FeastWeekPartyPoint, # 领取周狂欢积分奖励26
|
| | | Def_RewardType_FeastWeekPartyAct, # 领取节日巡礼活动奖励25
|
| | | Def_RewardType_FeastWeekPartyPoint, # 领取节日巡礼积分奖励26
|
| | | )= range(27)
|
| | |
|
| | |
|
| | |
| | | if not state:
|
| | | GameWorld.DebugLog("限时抢购非活动中!state=%s" % (state), curPlayer.GetPlayerID())
|
| | | return
|
| | | shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state)
|
| | | shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state, actInfo.get(ShareDefine.ActKey_WorldLV, 0))
|
| | | if not shopTypeList:
|
| | | return
|
| | | actShopType = shopTypeList[0]
|
| | |
| | | PlayerNewFairyCeremony.GetFCPartyAward(curPlayer, dataEx)
|
| | | # 领取节日巡礼活动奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyAct:
|
| | | PlayerWeekParty.GetWeekPartyActionAward(curPlayer, dataEx, dataExStr)
|
| | | PlayerFeastWeekParty.GetFeastWeekPartyActionAward(curPlayer, dataEx, dataExStr)
|
| | | # 领取节日巡礼积分奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyPoint:
|
| | | PlayerFeastWeekParty.GetFeastWeekPartyPointAward(curPlayer, dataEx, dataExStr)
|
| | |
| | | import datetime
|
| | |
|
| | |
|
| | | def GetShopTypeList(cfgID, dayIndex, state):
|
| | | def GetShopTypeList(cfgID, dayIndex, state, woldLV):
|
| | | if cfgID == 0 or state == 0:
|
| | | return []
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
|
| | | if not ipyData:
|
| | | return []
|
| | | shopTypeList = ipyData.GetShopTypeList()
|
| | | shopTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetShopTypeList(), woldLV, [])
|
| | | if not shopTypeList:
|
| | | return []
|
| | | todayShopTypeList = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
|
| | | return [todayShopTypeList[state - 1] if state - 1 < len(todayShopTypeList) else todayShopTypeList[-1]]
|
| | |
|
| | |
| | | state = actInfo.get(ShareDefine.ActKey_State, 0)
|
| | | cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
|
| | | dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
|
| | | woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleID, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动ID
|
| | | playerActState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleState, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动State
|
| | | playerMailState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleMailState, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动提醒邮件状态
|
| | |
| | | GameWorld.DebugLog(' 限时抢购活动重置!')
|
| | | curPlayer.ClearNomalDict(ChConfig.Def_PDictType_FlashSale)
|
| | |
|
| | | shopTypeList = GetShopTypeList(cfgID, dayIndex, state)
|
| | | shopTypeList = GetShopTypeList(cfgID, dayIndex, state, woldLV)
|
| | | if shopTypeList:
|
| | | FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleID, actID, ChConfig.Def_PDictType_FlashSale)
|
| | |
| | | flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
|
| | | if not flashSaleIpyData:
|
| | | return
|
| | | shopTypeList = flashSaleIpyData.GetShopTypeList()
|
| | | woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
|
| | | startTimeList = flashSaleIpyData.GetStartTimeList()
|
| | | endTimeList = flashSaleIpyData.GetEndTimeList()
|
| | | if len(startTimeList) != len(endTimeList):
|
| | |
| | | flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
|
| | | if not flashSaleIpyData:
|
| | | return
|
| | | woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | |
| | | packInfo = ChPyNetSendPack.tagMCFlashSaleAppointmentInfo()
|
| | | packInfo.GoodsList = []
|
| | | if goodsID == 0:
|
| | | packInfo.IsAll = 1
|
| | | shopTypeList = flashSaleIpyData.GetShopTypeList()
|
| | | shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
|
| | | for dayIndex, shopList in enumerate(shopTypeList):
|
| | | for timeIndex, shopType in enumerate(shopList):
|
| | | shopItemIpyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ShopType":shopType}, True, True)
|
| | |
| | | OperationActionName_NewFairyCeremony, ] \
|
| | | + FeastOperationActionNameList
|
| | | #需要记录开启活动时的世界等级的运营活动
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
|
| | | NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, |
| | | OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
|
| | |
|
| | | #活动信息字典key定义
|
| | | ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
|