| | |
| | | ResetShopItemBuyCount(curPlayer, [refreshType])
|
| | | return
|
| | |
|
| | | def ResetShopItemBuyCount(curPlayer, onEventTypeList=[]):
|
| | | #@param onEventTypeList: 需要重置的类型列表,为空时重置所有类型
|
| | | def ResetShopItemBuyCount(curPlayer, resetTypeList):
|
| | | #@param resetTypeList: 需要重置的类型列表
|
| | | #重置商店物品购买次数 1:周一0点刷新 2:周一5点刷新 3:每日0点刷新 4:每日5点刷新 5每月0点 6每月5点 7每3天5点 8每赛季
|
| | | if not resetTypeList:
|
| | | # 暂定必须指定类型列表,防止终身限购的误被重置
|
| | | return
|
| | | |
| | | syncIndexList = []
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for i in xrange(ipyDataMgr.GetStoreCount()):
|
| | | shopItem = ipyDataMgr.GetStoreByIndex(i)
|
| | | if not shopItem.GetLimitCnt():
|
| | | continue
|
| | | if onEventTypeList and shopItem.GetRefreshType() not in onEventTypeList:
|
| | | if shopItem.GetRefreshType() not in resetTypeList:
|
| | | continue
|
| | | dayBuyCntKey = ChConfig.Def_PDict_ShopItemDayBuyCnt % shopItem.GetID()
|
| | | curDayBuyCnt = curPlayer.NomalDictGetProperty(dayBuyCntKey)
|