16 卡牌服务端(合成目标物品与材料物品不在同一背包时支持合成;)
1个文件已修改
24 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/Operate_ItemCompound.py
@@ -110,13 +110,19 @@
        return
    
    itemPack = curPlayer.GetItemManager().GetPack(packType)
    unfixedItemPack, fixedItemPack = None, None # 目标物品与材料可能在不同背包,区分开
    itemExpireTime = 0
    # 检查不固定消耗道具
    if unfixedItemIDList:
        unfixedItem = GameWorld.GetGameData().GetItemByTypeID(unfixedItemIDList[0])
        if not unfixedItem:
            return
        unfixedItemCostInfo = __CheckUnfixedItem(curPlayer, compoundID, makeItemData, itemPack, unfixedItemIndexList,
        unfixedPackType = ChConfig.GetItemPackType(unfixedItem, IPY_GameWorld.rptItem)
        unfixedItemPack = curPlayer.GetItemManager().GetPack(unfixedPackType)
        GameWorld.DebugLog("unfixedPackType=%s" % (unfixedPackType), playerID)
        if not unfixedItemPack:
            return
        unfixedItemCostInfo = __CheckUnfixedItem(curPlayer, compoundID, makeItemData, unfixedItemPack, unfixedItemIndexList,
                                                 unfixedItemIDList, needUnfixedItemCount)
        if not unfixedItemCostInfo:
            return
@@ -126,7 +132,15 @@
        
    # 检查固定消耗道具
    if fixedItemIDList:
        fixedItemInfo = __CheckFixedItem(playerID, compoundID, itemPack, fixedItemIndexList, fixedItemIDList, fixedItemCountList, compoundCnt)
        fixedItem = GameWorld.GetGameData().GetItemByTypeID(fixedItemIDList[0])
        if not fixedItem:
            return
        fixedPackType = ChConfig.GetItemPackType(fixedItem, IPY_GameWorld.rptItem)
        fixedItemPack = curPlayer.GetItemManager().GetPack(fixedPackType)
        GameWorld.DebugLog("fixedPackType=%s" % (fixedPackType), playerID)
        if not fixedItemPack:
            return
        fixedItemInfo = __CheckFixedItem(playerID, compoundID, fixedItemPack, fixedItemIndexList, fixedItemIDList, fixedItemCountList, compoundCnt)
        if not fixedItemInfo:
            return
        fixedItemIndexDict, fixedItemNeedCntDict, compoundBindCnt, expireTime = fixedItemInfo
@@ -156,7 +170,7 @@
    # 扣不固定消耗物品
    if unfixedItemIDList:
        bindUnfixedIndexList, unbindUnfixedIndexList = unfixedItemCostList
        hasBind = ItemCommon.ReduceItem(curPlayer, itemPack, bindUnfixedIndexList + unbindUnfixedIndexList, needUnfixedItemCount,
        hasBind = ItemCommon.ReduceItem(curPlayer, unfixedItemPack, bindUnfixedIndexList + unbindUnfixedIndexList, needUnfixedItemCount,
                                        False, ChConfig.ItemDel_ItemCompound, drDict)
        makeItemBind = True if hasBind else makeItemBind
        
@@ -167,9 +181,9 @@
            bindFixedIndexList, unbindFixedIndexList = fixedItemIndexDict[fixedItemID]
            if delBindCnt:
                makeItemBind = True
                ItemCommon.ReduceItem(curPlayer, itemPack, bindFixedIndexList, delBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
                ItemCommon.ReduceItem(curPlayer, fixedItemPack, bindFixedIndexList, delBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
            if delUnBindCnt:
                ItemCommon.ReduceItem(curPlayer, itemPack, unbindFixedIndexList, delUnBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
                ItemCommon.ReduceItem(curPlayer, fixedItemPack, unbindFixedIndexList, delUnBindCnt, False, ChConfig.ItemDel_ItemCompound, drDict)
    
    # 扣提升概率道具
    if incRateItemCostList: