hch
2019-06-21 fd892c53d4c0f97b11713d9571f20b110dd2fece
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -213,71 +213,6 @@
    return msgList
## 提示超级装备
#  @param curPlayer 当前玩家
#  @param curItem 得到的物品
#  @param notifyType 鉴定1 打造2 升星3 神器升星4 神器唤醒5 宠物装备合成6 丢宝箱装备7
#  @param useItemID 使用的物品id
#  @return None
#  @remarks 函数详细说明.
def Notify_SuperItem(curPlayer, curItem, notifyType, useItemID=0):
#===============================================================================
#Item_Link_Appraisal 鉴定出了一件惊世神装
#Item_Link_Factory   打造出了一件惊世神装
#S1 -> playID,S2 -> playname,S3 -> playname,s4 -> itemID,s5 -> start,s6 -> hole,s7-s15 stoneID,s16 -> 五行,
#s17 -> 灵魂技能ID,s18 -> 当前耐久,s19 -> 最大耐久,s20 -> 绑定,s21 -> MakeID,s22 -> 物品名字
#===============================================================================
    #升星及神器
    if notifyType in [3]:
#===============================================================================
#        #升星的系统提示参数列表
#        roleName = curPlayer.GetName()
#
#        #S1 -> playID,S2 -> playname,S3 -> playname,
#        msgList = ['%s' % curPlayer.GetID(), '%s' % roleName, '%s' % roleName]
#
#        # 物品xml参数s4-s55
#        msgList.extend(GetItemXMLMsg(curItem))
#
# #        GameWorld.Log('升星,msgList = %s, %s'%(len(msgList), msgList))
#        if notifyType == 3:
#            msgList.extend(["%s" % curItem.GetItemStarLV()])  # 升星最后一个参数为星数
#            #普通升星
#            PlayerControl.WorldNotify(0, "Item_Link_UpGrade", msgList)
#===============================================================================
        return
    #---除升星外的系统提示参数列表---
    msgList = ['%s' % curPlayer.GetID(), '%s' % curPlayer.GetName(), '%s' % curPlayer.GetName(),
               '%s' % curItem.GetItemTypeID(),'%s' % curItem.GetIsBind(), '%s' % curItem.GetItemTypeID()
               ]
    #鉴定
    if notifyType == 1:
        PlayerControl.WorldNotify(0, "Item_Link_Appraisal", msgList)
    #打造
    elif notifyType == 2:
        PlayerControl.WorldNotify(0, "Item_Link_Factory", msgList)
    #宠物装备合成
    elif notifyType == 6:
        PlayerControl.WorldNotify(0, "Pet_liubo_436832", msgList)
    # mu装备全服广播
    elif notifyType == 7:
        # 插入使用的物品名
        if not useItemID:
            return
        msgList.insert(3, '%s' % useItemID)
        msgList.insert(4, '%s' % useItemID)
        itemInfo = GetNotifySuperItemInfo(curPlayer, curItem)
        msgList = msgList[:5] + itemInfo
        PlayerControl.WorldNotify(0, "GeRen_lhs_318691", msgList)
    return
#---------------------------------------------------------------------
## 清除按天过期物品
#  @param curPlayer 玩家
#  @return None
@@ -440,7 +375,7 @@
def CalcEquipGS(curItem):
    '''计算装备评分
        评分组成:装备基础 + 传奇属性 + 绝版属性
        评分组成:装备基础 + 传奇属性
    '''
    if not CheckNoteEquipGS(curItem):
        #GameWorld.DebugLog("不设置装备评分")
@@ -457,10 +392,19 @@
            break
        attrDict[effectID] = attrDict.get(effectID, 0) + curEffect.GetEffectValue(0)
        
    gsValueEx = 0
    skillGSDict = IpyGameDataPY.GetFuncCfg("EquipGSFormula", 4)
    for i in xrange(curItem.GetAddSkillCount()):
        addSkillID = curItem.GetAddSkill(i)
        if not addSkillID:
            break
        gsValueEx += skillGSDict.get(str(addSkillID), 0)
    itemID = curItem.GetItemTypeID()
    classLV = GetItemClassLV(curItem)
    color = curItem.GetItemColor()
    isSuit = 1 if curItem.GetSuiteID() > 0 else 0
    gsParamIpyData = IpyGameDataPY.GetIpyGameData("EquipGSParam", classLV, color, isSuit)
    gsParamIpyData = IpyGameDataPY.GetIpyGameDataNotLog("EquipGSParam", classLV, color, isSuit)
    # 传奇属性
    legendAttrIDCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrID)
    legendAttrValueCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetLegendAttrValue)
@@ -470,6 +414,10 @@
            attrValue = curItem.GetUserAttrByIndex(ShareDefine.Def_IudetLegendAttrValue, i)
            attrDict[attrID] = attrDict.get(attrID, 0) + attrValue
            
    lingQiIpyData = IpyGameDataPY.GetIpyGameDataNotLog("LingQiAttr", itemID)
    if lingQiIpyData:
        gsValueEx += lingQiIpyData.GetLingQiAttrScore()
    Atk = attrDict.get(ShareDefine.Def_Effect_Atk, 0)
    MinAtk = attrDict.get(ShareDefine.Def_Effect_MinAtk, 0) + Atk
    MaxAtk = attrDict.get(ShareDefine.Def_Effect_MaxAtk, 0) + Atk
@@ -478,6 +426,7 @@
    ArmorDefPer = 0
    IceAtk = attrDict.get(ShareDefine.Def_Effect_IceAtk, 0)
    IceDef = attrDict.get(ShareDefine.Def_Effect_IceDef, 0)
    FabaoHurt = attrDict.get(ShareDefine.Def_Effect_FabaoHurt, 0)
    
    BaseEquipMaxHPAddPer = attrDict.get(ShareDefine.Def_Effect_BaseEquipMaxHPAddPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetBaseEquipMaxHPAddPerC())
    BaseEquipAtkAddPer = attrDict.get(ShareDefine.Def_Effect_BaseEquipAtkAddPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetBaseEquipAtkAddPerC())
@@ -485,6 +434,7 @@
    DamagePer = 0#attrDict.get(ShareDefine.Def_Effect_DamagePer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetDamagePerC())
    SuperHitRate = 0#attrDict.get(ShareDefine.Def_Effect_SuperHitRate, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSuperHitRateC())
    SuperHit = attrDict.get(ShareDefine.Def_Effect_SuperHit, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSuperHitC())
    SuperHitPer = attrDict.get(ShareDefine.Def_Effect_SuperHitPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSuperHitPerC())
    DamReducePer = 0#attrDict.get(ShareDefine.Def_Effect_DamReducePer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetDamReducePerC())
    MaxHPPer = 0#attrDict.get(ShareDefine.Def_Effect_MaxHPPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetMaxHPPerC())
    DefPer = 0#attrDict.get(ShareDefine.Def_Effect_DefPer, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetDefPerC())
@@ -509,33 +459,24 @@
    SkillAtkRateReduce = 0#attrDict.get(ShareDefine.Def_Effect_SkillAtkRateReduce, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAtkRateReduceC())
    Hit = attrDict.get(ShareDefine.Def_Effect_Hit, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetHitC())
    Miss = attrDict.get(ShareDefine.Def_Effect_Miss, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetMissC())
    SkillAddPerA = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer1, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer1C())
    SkillAddPerB = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer2, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer2C())
    SkillAddPerC = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer3, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer3C())
    SkillAddPerD = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer4, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer4C())
    SkillAddPerE = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer5, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer5C())
    SkillAddPerF = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer6, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer6C())
    SkillAddPerG = 0#attrDict.get(ShareDefine.Def_Effect_SkillAddPer7, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillAddPer7C())
    SkillReducePerA = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer1, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer1C())
    SkillReducePerB = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer2, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer2C())
    SkillReducePerC = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer3, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer3C())
    SkillReducePerD = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer4, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer4C())
    SkillReducePerE = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer5, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer5C())
    SkillReducePerF = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer6, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer6C())
    SkillReducePerG = 0#attrDict.get(ShareDefine.Def_Effect_SkillReducePer7, 0) * (1 if not gsParamIpyData else gsParamIpyData.GetSkillReducePer7C())
    SkillAddPerA = 0
    SkillAddPerB = 0
    SkillAddPerC = 0
    SkillAddPerD = 0
    SkillAddPerE = 0
    SkillAddPerF = 0
    SkillAddPerG = 0
    SkillReducePerA = 0
    SkillReducePerB = 0
    SkillReducePerC = 0
    SkillReducePerD = 0
    SkillReducePerE = 0
    SkillReducePerF = 0
    SkillReducePerG = 0
    
    # 攻速不默认乘,仅作为参数提供策划使用
    AtkSpeed = 0#attrDict.get(ShareDefine.Def_Effect_AtkSpeed, 0)
    AtkSpeedC = 1#1 if not gsParamIpyData else gsParamIpyData.GetAtkSpeedC()
    # 绝版
    outOfPrintAttrIDCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetOutOfPrintAttrID)
    outOfPrintAttrValueCnt = curItem.GetUserAttrCount(ShareDefine.Def_IudetOutOfPrintAttrValue)
    if outOfPrintAttrIDCnt and outOfPrintAttrIDCnt == outOfPrintAttrValueCnt:
        for i in xrange(legendAttrIDCnt):
            attrID = curItem.GetUserAttrByIndex(ShareDefine.Def_IudetOutOfPrintAttrID, i)
            attrValue = curItem.GetUserAttrByIndex(ShareDefine.Def_IudetOutOfPrintAttrValue, i)
            attrDict[attrID] = attrDict.get(attrID, 0) + attrValue
    
    OnlyFinalHurt = attrDict.get(ShareDefine.Def_Effect_OnlyFinalHurt, 0)
    PVPAtkBackHP = attrDict.get(ShareDefine.Def_Effect_PVPAtkBackHP, 0)  
@@ -543,22 +484,10 @@
    if GetIsDogzEquip(curItem):
        # 神兽装备用不同公式
        value = eval(FormulaControl.GetCompileFormula("EquipGSFormula3", IpyGameDataPY.GetFuncCfg("EquipGSFormula", 3)))
    elif GetIsZhuXianEquip(curItem):
        value = eval(FormulaControl.GetCompileFormula("EquipGSFormula4", IpyGameDataPY.GetFuncCfg("EquipGSFormula", 4)))
    else:
        value = eval(FormulaControl.GetCompileFormula("EquipGSFormula", IpyGameDataPY.GetFuncCfg("EquipGSFormula")))
    value += gsValueEx
    return value
def GetZhuXianEquipTotalGS(curPlayer):
    ##诛仙装备总评分
    equipScoreTotal = 0
    zhuXianEquipPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptZhuXianEquip)
    for equipIndex in xrange(zhuXianEquipPack.GetCount()):
        curEquip = zhuXianEquipPack.GetAt(equipIndex)
        if curEquip.IsEmpty():
            continue
        equipScoreTotal += GetEquipGearScore(curEquip)
    return equipScoreTotal
#---------------------------------------------------------------------
## 通过效果ID,检查是否为指定物品 
@@ -758,48 +687,6 @@
        return 0
    keyStr = ChConfig.Def_VPackCnt_Dict[packindex]
    return IpyGameDataPY.GetFuncCfg(keyStr)
#---------------------------------------------------------------------
## 获得物品信息提示
#  @param curPlayer 当前玩家
#  @param useItemID 使用物品
#  @param singleItem 通知的物品对象
#  @return None
#  @remarks 函数详细说明.
def NeedNotifyItem(curPlayer, useItemID , singleItem):
    #需要提示的物品列表
    #===========================================================================
    # itemIDDict = ReadChConfig.GetEvalChConfig('need_notify_id_dict')
    # if useItemID not in itemIDDict.keys():
    #    return
    #
    # notifyList = itemIDDict.get(useItemID, [])
    #
    # if not notifyList:
    #    GameWorld.Log("NeedNotifyItem() need_notify_id_dict.txt error useItemID=%s not data" % (useItemID))
    #    return
    #
    # isQualityNotify = notifyList[0] # 卓越是否提示
    # notifyStarLV = notifyList[1] # 通知的强化星级
    # itemIdList = notifyList[2:] # 去除星级通知的,其他的为具体id通知
    #
    # curItemID = singleItem.GetItemTypeID()
    # curItemCount = singleItem.GetCount()
    # # 如果是指定标的物
    # if (curItemID, curItemCount) in itemIdList:
    #    PlayerControl.WorldNotify(0, "itemuse_chenxin_0", [curPlayer.GetPlayerName(),
    #                             useItemID, useItemID, curItemID, curItemID, curItemCount])
    #    return
    #
    # # 其他的装备判断
    # itemQuality = singleItem.GetItemQuality()
    # isSuite = singleItem.GetIsSuite()
    # plusLV = singleItem.GetItemStarLV()
    # # 卓越广播,套装广播,星级广播
    # if (isQualityNotify and itemQuality) or isSuite or plusLV >= notifyStarLV:
    #    Notify_SuperItem(curPlayer, singleItem, 7, useItemID)
    #===========================================================================
    return
## 杀怪掉落提示
@@ -807,93 +694,58 @@
#  @return None
def NotifyItemDropByKill(curPlayer, curItem, npcID, notifyMark='', mapID=0):
    return #吕超说此处屏蔽
    #需要提示的物品列表
    itemIDDict = ReadChConfig.GetEvalChConfig('need_notify_id_dict')
    notifyList = itemIDDict.get(0, [])
    if not notifyList:
        #GameWorld.Log("NotifyItemDropByKill() need_notify_id_dict.txt error useItemID=0")
        return
    playerName = curPlayer.GetPlayerName()
    notifyQuality = notifyList[0] # 需要提示的品质等级
    notifyStarLV = notifyList[1] # 通知的强化星级
    itemIdList = notifyList[2:] # 去除星级通知的,其他的为具体id通知
    curItemID = curItem.GetItemTypeID()
    curItemCount = curItem.GetCount()
    mapID = GameWorld.GetMap().GetMapID() if not mapID else mapID
    # 如果是指定标的物
    if (curItemID, curItemCount) in itemIdList:
        itemIDMarkDict = ReadChConfig.GetEvalChConfig('need_notify_id_mark_dict')
        notifyMark = itemIDMarkDict.get(curItemID, "GeRen_admin_272921")
        PlayerControl.WorldNotify(0, notifyMark, [playerName, mapID, npcID, curItemID, curItemID])
        return
    # 其他的装备判断
#    itemQuality = curItem.GetItemQuality()
#    isSuite = curItem.GetIsSuite()
#    plusLV = curItem.GetItemStarLV()
#    # 卓越广播,套装广播,星级广播
#    if not ((itemQuality >= notifyQuality) or isSuite or plusLV >= notifyStarLV):
#        return
    msgList = ['%s' % playerName,
               '%s' % mapID,
               '%s' % npcID,
               #'%s' % 0,
               ] + GetNotifySuperItemInfo(curPlayer, curItem)
    notifyMark = notifyMark if notifyMark else "GeRen_admin_671654"
    PlayerControl.WorldNotify(0, notifyMark , msgList)
    return
def GetNotifySuperItemInfo(curPlayer, curItem, place=None):
    '''装备提示超链接信息汇总
    <a><Word info=item id=%s0/>|showitem=%s0 isbind=%s1 itemcnt=%s2 stone=%s3 userdata=%s4 place=%s5 equippartsuite=%s6 strengthenlv=%s7 equipwash=%s8 equipitems=%s9</a>
    isbind:是否绑定
    itemcnt:物品数量
    stone:宝石信息 [stoneItemID, ...]
    userdata:传奇属性
    place:装备位
    equippartsuite:套装信息 同查看玩家
    strengthenlv:强化等级
    equipwash:洗练信息 同查看玩家,单部位
    equipitems:各部位物品id [[装备位,物品id] ...]
def CacheNotifyEquipDetailInfo(curPlayer, curEquip):
    ''' 缓存装备广播信息中的装备明细信息
            因为本版本需要的查看的内容相对较多,为了减少全服广播流量消耗,所以先进行缓存,玩家点击查看时再进行查询
    '''
    if place == None:
        place = curItem.GetEquipPlace()
    guid = curEquip.GetGUID()
    packType = curEquip.GetItemPlaceType()
    packIndex = curEquip.GetItemPlaceIndex()
    if packType != IPY_GameWorld.rptEquip:
        return guid
    classLV = GetItemClassLV(curEquip)
    if not classLV:
        return guid
    itemID = curEquip.GetItemTypeID()
    #部位星级
    equipStar = ChEquip.GetEquipPartStarByRank(curPlayer, packIndex, curEquip)
    #部位强化数据
    plusLV = ChEquip.GetEquipPartPlusLVByRank(curPlayer, packType, packIndex, curEquip)
    plusEvolveLV = ChEquip.GetEquipPartPlusEvolveLVByEquip(curPlayer, packType, packIndex, curEquip)
    #部位洗练数据
    washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % packIndex)
    washValueList = []
    for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1):
        value = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (packIndex, attrNum))
        washValueList.append(value)
        
    notifyList = [""] * 10
    notifyList[0] = curItem.GetItemTypeID()
    notifyList[1] = curItem.GetIsBind()
    notifyList[2] = curItem.GetCount()
    notifyList[3] = "%s" % Operate_EquipStone.GetEquipIndexStoneIDList(curPlayer, place)
    userData = curItem.GetUserData()
    notifyList[4] = userData if (userData and userData != "{}") else ""
    notifyList[5] =  place
    notifyList[6] = ""
    notifyList[7] = ChEquip.GetEquipPartPlusLV(curPlayer, IPY_GameWorld.rptEquip, place)
    #部位宝石数据
    stoneIDList = Operate_EquipStone.GetEquipIndexStoneIDList(curPlayer, packIndex)
    
    # 单部位洗练信息
    washLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashLV % place) + 1
    valueList = [curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_EquipWashValue % (place, attrNum)) \
                    for attrNum in xrange(1, Operate_EquipWash.Def_EquipWashMaxAttrCount + 1)]
    notifyList[8] = "%s" % {"Place":place, "LV":washLV, "Value":valueList}
    # 身上所穿装备ID信息
    equipItems = []
    playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
    for equipIndex in xrange(playerEquip.GetCount()):
        if equipIndex not in ShareDefine.RoleEquipType :
            continue
        curEquip = playerEquip.GetAt(equipIndex)
        if not curEquip or curEquip.IsEmpty():
            continue
        equipItems.append([curEquip.GetItemPlaceIndex(), curEquip.GetItemTypeID()])
    notifyList[9] = "%s" % equipItems
    return notifyList
    #本阶已穿装备ID [[itemID,star], ...]
    classItems = []
    ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition('EquipPlaceIndexMap', {'ClassLV':classLV}, True)
    if ipyDataList:
        equipPack = curPlayer.GetItemManager().GetPack(packType)
        for ipyData in ipyDataList:
            index = ipyData.GetGridIndex()
            classEquip = equipPack.GetAt(index)
            if not classEquip or classEquip.IsEmpty():
                continue
            equipID = classEquip.GetItemTypeID()
            star = ChEquip.GetEquipPartStarByRank(curPlayer, index, classEquip)
            classItems.append([equipID, star])
    cacheInfo = [guid, itemID, equipStar, plusLV, plusEvolveLV, washLV, washValueList, stoneIDList, classItems]
    cacheInfo = json.dumps(cacheInfo, ensure_ascii=False)
    GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "NotifyEquipDetailInfo", cacheInfo, len(cacheInfo))
    return guid
## 使用物品的特殊提示
#  @param curPlayer 当前玩家
@@ -1732,11 +1584,11 @@
#  @remarks 函数详细说明.
def SwitchItem(curPlayer, curItem, switchItem, putInPackIndex):
    ##物品绑定字段判定 -> 装备绑定
    if putInPackIndex in [IPY_GameWorld.rptEquip, ShareDefine.rptZhuXianEquip]:
    if putInPackIndex in [IPY_GameWorld.rptEquip]:
        DoLogic_ItemBindType(curPlayer, switchItem, ChConfig.Def_BindType_DoEquipBind)
        
    # 装备技能书、坐骑装备绑定
    if putInPackIndex in [IPY_GameWorld.rptHorseEquip, ShareDefine.rptZhuXianEquip]:
    if putInPackIndex in [IPY_GameWorld.rptHorseEquip]:
        DoLogic_ItemBindType(curPlayer, curItem, ChConfig.Def_BindType_DoEquipBind)
    
    #交换装备
@@ -1757,11 +1609,11 @@
        return
    
    ##物品绑定字段判定 -> 装备绑定
    if putInPackIndex in [IPY_GameWorld.rptEquip, ShareDefine.rptZhuXianEquip]:
    if putInPackIndex in [IPY_GameWorld.rptEquip]:
        DoLogic_ItemBindType(curPlayer, switchItem, ChConfig.Def_BindType_DoEquipBind)
    
    # 装备技能书、坐骑装备绑定
    if putInPackIndex in [IPY_GameWorld.rptHorseEquip, ShareDefine.rptZhuXianEquip]:
    if putInPackIndex in [IPY_GameWorld.rptHorseEquip]:
        DoLogic_ItemBindType(curPlayer, emptyItem, ChConfig.Def_BindType_DoEquipBind)
    if switchItem.GetGameWorldItemType() == IPY_GameWorld.gwitRoleItem:
@@ -1783,10 +1635,6 @@
def GetIsDogzEquip(curItem):
    ## 返回是否神兽装备
    return curItem.GetType() in ChConfig.Def_DogzEquiipType
def GetIsZhuXianEquip(curItem):
    ## 返回是否诛仙装备
    return curItem.GetType() in ChConfig.Def_ZhuXianEquiipType
#---------------------------------------------------------------------
##遍历数据库查找合适的物品, 通过 效果ID + 效果A值确定物品
@@ -2076,17 +1924,24 @@
    return itemDict
def GetWeightItemListByAlchemyDiffLV(curPlayer, weightList, alchemyDiffLV):
    ## 根据炼丹等级差异等级过滤权重列表中不满足的物品,返回新的权重列表
    ''' 根据炼丹等级差异等级过滤权重列表中不满足的物品,返回新的权重列表
    @param weightList: 物品权重信息列表
    @param alchemyDiffLV: 是否过滤掉大于X级的炼丹等级物品,0-不过滤,1-过滤且读默认配置,>1-特殊功能指定的过滤等级
    '''
    resultWeightList = []
    if alchemyDiffLV:
        # 如果有指定大于1的等级则取指定等级,没有的话取默认等级差
        if alchemyDiffLV == 1:
            alchemyDiffLV = IpyGameDataPY.GetFuncCfg("AlchemyDiffLV", 1)
        curAlchemyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyLV)
        for itemInfo in weightList:
            itemID = itemInfo[1][0]
            itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
            if not itemData:
                continue
            if GetItemClassLV(itemData) > curAlchemyLV + alchemyDiffLV:
                continue
            if itemID: # 支持配置ID为0时代表不产出
                itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
                if not itemData:
                    continue
                if GetItemClassLV(itemData) > curAlchemyLV + alchemyDiffLV:
                    continue
            resultWeightList.append(itemInfo)
    else:
        resultWeightList = weightList