7963 【主干】【后端】升星添加特殊材料逻辑变更
| | |
| | | if curRate <= 0:
|
| | | GameWorld.Log('装备升星异常 概率为0!!equipPackIndex=%s'%equipPackIndex)
|
| | | return result
|
| | | #判断普通物品材料
|
| | | isOK = GameWorld.CanHappen(curRate, 100)
|
| | | #判断普通物品材料 成功才扣
|
| | | costItemDict = ipyData.GetCostItemDict()
|
| | | if costItemDict:
|
| | | if isOK and costItemDict:
|
| | | delItemDict = {}
|
| | | for itemID, itemCnt in costItemDict.items():
|
| | | hasEnough, indexList, findItemIsBind, lackCnt = ItemCommon.GetItem_FromPack_ByID_ExEx(itemID, itemPack, itemCnt)
|
| | |
| | | ItemCommon.ReduceItem(curPlayer, itemPack, itemIndexList, delCnt, True, ChConfig.ItemDel_EquipStarUp)
|
| | | #扣装备
|
| | | ItemCommon.ReduceItem(curPlayer, itemPack, delEquipIndexList, len(delEquipIndexList), True, ChConfig.ItemDel_EquipStarUp)
|
| | | isOK = GameWorld.CanHappen(curRate, 100)
|
| | | |
| | | if isOK:
|
| | | ChEquip.SetEquipPartStar(curPlayer, equipPackIndex, nextStar)
|
| | | ChEquip.NotifyEquipPartStar(curPlayer, equipPackIndex)
|