| | |
| | | quality = ipyData.GetBeautyQuality()
|
| | | curLV, curExp = GetBeautyLVInfo(curPlayer, beautyID)
|
| | |
|
| | | isCommItem = True # 是否使用的常规通用物品
|
| | | commItemIDList = IpyGameDataPY.GetFuncEvalCfg("BeautyLVUP", 1)
|
| | | commExpList = IpyGameDataPY.GetFuncEvalCfg("BeautyLVUP", 2)
|
| | | if itemID in commItemIDList:
|
| | | index = commItemIDList.index(itemID)
|
| | | perExp = commExpList[index] if len(commExpList) > index else 0
|
| | | else:
|
| | | isCommItem = False
|
| | | unlockWay = ipyData.GetUnlockWay()
|
| | | unlockValue = ipyData.GetUnlockValue()
|
| | | if unlockWay != UnlockWay_Item:
|
| | | GameWorld.DebugLog("非道具激活的不支持专属信物ID升级! beautyID=%s,unlockWay=%s" % (beautyID, unlockWay), playerID)
|
| | | return
|
| | | if itemID != unlockValue:
|
| | | GameWorld.DebugLog("非该红颜专属信物ID! beautyID=%s,itemID=%s != %s" % (beautyID, itemID, unlockValue), playerID)
|
| | | exclusiveItemID = ipyData.GetExclusiveItemID()
|
| | | if itemID != exclusiveItemID:
|
| | | GameWorld.DebugLog("非该红颜专属信物ID! beautyID=%s,itemID=%s != %s" % (beautyID, itemID, exclusiveItemID), playerID)
|
| | | return
|
| | | perExp = IpyGameDataPY.GetFuncCfg("BeautyLVUP", 3)
|
| | |
|
| | |
| | | if costItemCount < 1:
|
| | | return
|
| | |
|
| | | if isCommItem:
|
| | | costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, itemID, costItemCount)
|
| | | lackCnt = costItemCount - bindCnt - unBindCnt
|
| | | if lackCnt > 0:
|
| | |
| | | # 扣除消耗
|
| | | if costItemCount > 0:
|
| | | ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, costItemCount, "Beauty")
|
| | | else:
|
| | | itemCount = ItemControler.GetItemCountByID(curPlayer, itemID)
|
| | | if itemCount < costItemCount:
|
| | | costItemCount = itemCount
|
| | | |
| | | if costItemCount > 0:
|
| | | ItemControler.SetItemCountByID(curPlayer, itemID, itemCount - costItemCount)
|
| | |
|
| | | addExp = costItemCount * perExp
|
| | | updExp = curExp + addExp
|