hch
2019-06-28 f5a2d72d60cf43cf28a44868d62deeda8d10482f
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -1927,12 +1927,14 @@
    return itemDict
def GetWeightItemListByAlchemyDiffLV(curPlayer, weightList, alchemyDiffLV):
    ''' 根据炼丹等级差异等级过滤权重列表中不满足的物品,返回新的权重列表
    ''' 根据炼丹等级差异等级过滤权重列表中不满足的物品,过滤最低玩家等级要求物品  返回新的权重列表
    @param weightList: 物品权重信息列表
    @param alchemyDiffLV: 是否过滤掉大于X级的炼丹等级物品,0-不过滤,1-过滤且读默认配置,>1-特殊功能指定的过滤等级
    '''
    resultWeightList = []
    if alchemyDiffLV:
    itemNeedPlayerLVDict = IpyGameDataPY.GetFuncEvalCfg("AlchemyDiffLV", 2, {})
    if alchemyDiffLV or itemNeedPlayerLVDict:
        playerLV = curPlayer.GetLV()
        # 如果有指定大于1的等级则取指定等级,没有的话取默认等级差
        if alchemyDiffLV == 1:
            alchemyDiffLV = IpyGameDataPY.GetFuncCfg("AlchemyDiffLV", 1)
@@ -1945,6 +1947,9 @@
                    continue
                if GetItemClassLV(itemData) > curAlchemyLV + alchemyDiffLV:
                    continue
                if itemID in itemNeedPlayerLVDict:
                    if playerLV < itemNeedPlayerLVDict[itemID]:
                        continue
            resultWeightList.append(itemInfo)
    else:
        resultWeightList = weightList