| | |
| | | maxCnt = ItemCommon.GetCanUseCountDaily(curItem)
|
| | | if maxCnt <= 0:
|
| | | return -1
|
| | | curItemID = curItem.GetItemTypeID()
|
| | | useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % curItemID)
|
| | | for itemIDList in IpyGameDataPY.GetFuncEvalCfg('ShareUseCntItem'):
|
| | | if curItemID not in itemIDList:
|
| | | continue
|
| | | for itemID in itemIDList:
|
| | | if itemID == curItemID:
|
| | | continue
|
| | | useCnt += curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | |
|
| | | itemID = curItem.GetItemTypeID()
|
| | | useCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_ItemUseCntToday % itemID)
|
| | | canUseCnt = max(0, maxCnt - useCnt)
|
| | |
|
| | | if canUseCnt <= 0:
|
| | | GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (itemID, useCnt, maxCnt))
|
| | | GameWorld.DebugLog("已达到今日使用次数上限!itemID=%s,useCnt=%s,maxCnt=%s" % (curItemID, useCnt, maxCnt))
|
| | | #PlayerControl.NotifyCode(curPlayer, notifyMark, [itemID])
|
| | |
|
| | | #GameWorld.DebugLog("物品ID(%s)今日已使用次数(%s), maxCnt=%s" % (itemID, useCnt, maxCnt))
|