358 【内政】红颜系统-服务端(红颜消耗物品激活改为消耗背包中的物品;)
| | |
| | | if unlockWay == UnlockWay_Item:
|
| | | needItemID = unlockValue
|
| | | needItemCnt = unlockNeedCnt
|
| | | itemCount = ItemControler.GetItemCountByID(curPlayer, needItemID)
|
| | | if itemCount < needItemCnt:
|
| | | GameWorld.DebugLog("激活红颜物品不足! beautyID=%s,needItemID=%s,itemCount=%s < %s" % (beautyID, needItemID, itemCount, needItemCnt), playerID)
|
| | | |
| | | costItemIndexList, bindCnt, unBindCnt = ItemCommon.GetPackItemBindStateIndexInfo(curPlayer, needItemID, needItemCnt)
|
| | | lackCnt = needItemCnt - bindCnt - unBindCnt
|
| | | if lackCnt > 0:
|
| | | GameWorld.DebugLog("激活红颜物品不足! beautyID=%s,needItemID=%s,needItemCnt=%s,lackCnt=%s" % (beautyID, needItemID, needItemCnt, lackCnt), playerID)
|
| | | return
|
| | | ItemControler.DelItemCountByID(curPlayer, needItemID, needItemCnt)
|
| | | ItemCommon.DelCostItemByBind(curPlayer, costItemIndexList, bindCnt, unBindCnt, needItemCnt, "Beauty")
|
| | |
|
| | | elif unlockWay == UnlockWay_TaskID:
|
| | | taskID = unlockValue
|