9363 【BT5】【后端】新增魔化之地(增加特殊灵宠可配置不同升阶道具支持)
1个文件已修改
13 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerPet.py
@@ -627,7 +627,16 @@
    curItemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
    
    itemIndexList = []
    costItemIDList = IpyGameDataPY.GetFuncEvalCfg('PetUpItem')
    costItemIDList = []
    specCostItemInfo = IpyGameDataPY.GetFuncEvalCfg('PetUpItem', 4)
    for strItemID, petNPCIDList in specCostItemInfo.items():
        if petNPCID in petNPCIDList:
            costItemIDList = [int(strItemID)]
            break
    if not costItemIDList:
        costItemIDList = IpyGameDataPY.GetFuncEvalCfg('PetUpItem')
    if not costItemIDList:
        return
    
    #扣材料
    nowCnt = 0
@@ -647,7 +656,7 @@
                itemCnt = curItem.GetCount()
                nowCnt += itemCnt
    if not hasEnough and not isAutoBuy:
        GameWorld.DebugLog("PetClassUp 升阶道具不足。。。")
        GameWorld.DebugLog("PetClassUp 升阶道具不足! petNPCID=%s,costItemIDList=%s" % (petNPCID, costItemIDList))
        return
    
    autoBuyItemID = costItemIDList[0]