hxp
2019-05-23 5d9a338c76eba9fd98f95bdff77b78e4c657382e
6805 【后端】【2.0】副本前端化(增加过滤炼丹等级通用配置)
3个文件已修改
26 ■■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Item/UseItem/ItemCommon.py
@@ -1942,9 +1942,15 @@
    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]
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py
@@ -37,6 +37,9 @@
    npcControl.RefreshBuffState(tick)
    
    owner = NPCCommon.GetNpcObjOwnerDetail(curNPC)
    if not owner:
        return
    if GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), owner.GetPosX(), owner.GetPosY()) > 3:
        resetPos = GameMap.GetEmptyPlaceInArea(owner.GetPosX(), owner.GetPosY(), 2)
        curNPC.ResetPos(resetPos.GetPosX(), resetPos.GetPosY())
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5923,20 +5923,7 @@
        
    if not awardItemList:
        alchemyDiffLV = collectNPCIpyData.GetAlchemyDiffLV()
        giveItemWeightList = []
        if alchemyDiffLV:
            curAlchemyLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AlchemyLV)
            for itemInfo in collectAwardCfg:
                itemID = itemInfo[1][0]
                itemData = GameWorld.GetGameData().GetItemByTypeID(itemID)
                if not itemData:
                    continue
                if ItemCommon.GetItemClassLV(itemData) > curAlchemyLV + alchemyDiffLV:
                    continue
                giveItemWeightList.append(itemInfo)
        else:
            giveItemWeightList = collectAwardCfg
        giveItemWeightList = ItemCommon.GetWeightItemListByAlchemyDiffLV(curPlayer, collectAwardCfg, alchemyDiffLV)
        GameWorld.DebugLog("    常规采集物品权重列表: alchemyDiffLV=%s,collectAwardCfg=%s,giveItemWeightList=%s" % (alchemyDiffLV, collectAwardCfg, giveItemWeightList))
        giveItemInfo = GameWorld.GetResultByWeightList(giveItemWeightList)
        if giveItemInfo: