| | |
| | | if hasUseCnt <= 0:
|
| | | return DefaultReturn
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, eatCntKey, eatCnt)
|
| | | |
| | | if funcIndex == ShareDefine.Def_AttrFruitFunc_Stove:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_UseStoveBylv, hasUseCnt, [item.GetLV()])
|
| | | |
| | | ItemCommon.DelItem(curPlayer, item, hasUseCnt, True, ChConfig.ItemDel_AttrFruit)
|
| | | return addValue, hasUseCnt
|
| | |
|
| | |
| | |
|
| | | return eatCntDict
|
| | |
|
| | | def IsFruitEatFull(curPlayer, itemID):
|
| | | #使用次数是否已满
|
| | | ipyData = GetAttrFruitIpyData(itemID)
|
| | | if not ipyData:
|
| | | return
|
| | | |
| | | maxEatCnt = ipyData.GetMaxUseCnt()
|
| | | eatCntKey = ChConfig.Def_PDict_AttrFruitEatCnt % itemID
|
| | | limitType = Def_LimitType_Cnt
|
| | | if limitType == Def_LimitType_Attr:
|
| | | eatCntKey = ChConfig.Def_PDict_AttrFruitAddValue % itemID
|
| | | eatCnt = curPlayer.NomalDictGetProperty(eatCntKey) # 已吃次数/属性值
|
| | | if eatCnt >= maxEatCnt:
|
| | | return True
|
| | | return |