| | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SuperGiftHasOpen, 1)
|
| | |
|
| | |
|
| | | |
| | | SyncMysticalShopInfo(curPlayer)
|
| | | SyncShopItemTodayBuyCount(curPlayer)
|
| | | SyncSuperGiftInfo(curPlayer)
|
| | | return
|
| | |
| | | syncIndexList.append(shopItem.GetID())
|
| | | if syncIndexList:
|
| | | SyncShopItemTodayBuyCount(curPlayer, syncIndexList, True)
|
| | | return
|
| | |
|
| | | def MysticalShopOpen(curPlayer, befLV, aftLV):
|
| | | ##神秘限购开启
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('Store', {'ShopType':16}, True)
|
| | | if not ipyDataList:
|
| | | return
|
| | | curTime = int(time.time())
|
| | | syncGoodsList = []
|
| | | for ipyData in ipyDataList:
|
| | | limitLV = ipyData.GetLimitLV()
|
| | | if befLV < limitLV and aftLV >= limitLV:
|
| | | goodsID = ipyData.GetID()
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemStartTime % goodsID, curTime)
|
| | | syncGoodsList.append(goodsID)
|
| | | GameWorld.DebugLog('神秘限购商品%s 开卖'%goodsID, curPlayer.GetID())
|
| | | if syncGoodsList:
|
| | | SyncMysticalShopInfo(curPlayer)
|
| | | return
|
| | |
|
| | | def SyncMysticalShopInfo(curPlayer):
|
| | | ##神秘限购通知
|
| | | packData = ChPyNetSendPack.tagMCMysticalShopTimeInfo()
|
| | | packData.ShopTimeList = []
|
| | | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('Store', {'ShopType':16}, True)
|
| | | curTime = int(time.time())
|
| | | for ipyData in ipyDataList:
|
| | | goodsID = ipyData.GetID()
|
| | | startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ShopItemStartTime % goodsID)
|
| | | if not startTime:
|
| | | continue
|
| | | if curTime - startTime >= ipyData.GetLimitValue():
|
| | | #超时的重置
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_ShopItemStartTime % goodsID, 0)
|
| | | else:
|
| | | goodsTime = ChPyNetSendPack.tagMCMysticalShopTime()
|
| | | goodsTime.GoodsID = goodsID
|
| | | goodsTime.StartTime = startTime
|
| | | packData.ShopTimeList.append(goodsTime)
|
| | | if not packData.ShopTimeList:
|
| | | return
|
| | | packData.Count = len(packData.ShopTimeList)
|
| | | NetPackCommon.SendFakePack(curPlayer, packData)
|
| | | return
|
| | |
|
| | | ## 回购物品
|
| | |
| | | if itemIndex in IpyGameDataPY.GetFuncEvalCfg('CeremonyFireParty', 1, {}).values():
|
| | | return not PlayerFairyCeremony.IsCanBuyFireworks(curPlayer, itemIndex)
|
| | |
|
| | | if itemIndex in dict(IpyGameDataPY.GetFuncEvalCfg('SuperGiftTimeList')):
|
| | | return not CheckSuperGiftBuy(curPlayer, itemIndex)
|
| | | # if itemIndex in dict(IpyGameDataPY.GetFuncEvalCfg('SuperGiftTimeList')):
|
| | | # return not CheckSuperGiftBuy(curPlayer, itemIndex)
|
| | | if shopNPCID == 16:#神秘限购
|
| | | startTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ShopItemStartTime % itemIndex)
|
| | | curTime = int(time.time())
|
| | | return not startTime or curTime - startTime >= limitValue
|
| | | |
| | | #
|
| | | # limitPlusDict = {shopItem.GetLimitPlusType1():shopItem.GetLimitPlusValue1(),
|
| | | # shopItem.GetLimitPlusType2():shopItem.GetLimitPlusValue2(),
|