| | |
| | |
|
| | | def __DoMysticalShopRefresh(curPlayer, isFree, tick):
|
| | | global g_mysticalShopDict #{等级范围:[等级段,{金钱类型:库}]}
|
| | | |
| | | refreshTime = IpyGameDataPY.GetFuncCfg('MysteryShopRefresh', 4)
|
| | | if not refreshTime:
|
| | | return
|
| | |
|
| | | lastTime = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_MysticalShopLastTime)
|
| | | if lastTime and tick - lastTime < 1000:
|
| | | #GameWorld.DebugLog('神秘商店刷新,过于频繁!')
|
| | |
| | | g_mysticalShopDict[lvkey][1][moneyType] = []
|
| | | weightDict[moneyType] = weightDict.get(moneyType, 0) + weight
|
| | | g_mysticalShopDict[lvkey][1][moneyType].append([weightDict[moneyType], goodsID])
|
| | | |
| | | if not g_mysticalShopDict:
|
| | | return |
| | | playerLV = curPlayer.GetLV()
|
| | | curLVDan, shopDict = GameWorld.GetDictValueByRangeKey(g_mysticalShopDict, playerLV)
|
| | | if not shopDict:
|