9939 【BT0.1】【主干】装备升星修改(装备分解支持按品质及是否套装给固定物品)
1个文件已修改
19 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py
@@ -75,7 +75,7 @@
def EatItems(curPlayer, eatIndexList, eatItemIDList, isAuto=False):
    if len(eatIndexList) != len(eatItemIDList):
        return 0, 0
    drDelItemList, totalAddExp, delAllCnt = __GetCanEatItemInfo(curPlayer, eatIndexList, eatItemIDList)
    drDelItemList, totalAddExp, delAllCnt, giveItemIDDict = __GetCanEatItemInfo(curPlayer, eatIndexList, eatItemIDList)
    if not totalAddExp:
        GameWorld.DebugLog("    装备吸收 没有可吞噬物品!")
        return 0, 0
@@ -109,7 +109,7 @@
                minCnt = cnt
                minItemID = itemid
        
        giveItemIDDict = {}
        #giveItemIDDict = {}
        for _ in xrange(giveCnt):
            itmeID = GameWorld.GetResultByRandomList(awardRateList)
            if not itmeID:
@@ -118,6 +118,7 @@
                itmeID = minItemID
                
            giveItemIDDict[itmeID] = giveItemIDDict.get(itmeID, 0) + 1
        if giveItemIDDict:
            for giveItemID, itemCnt in giveItemIDDict.items(): 
                jsonItemList.append(ItemCommon.GetJsonItem([giveItemID,itemCnt,1]))
@@ -150,6 +151,9 @@
    eatItemList = []
    totalAddExp = 0
    allitemCnt = 0
    awardItemDict = {}
    eatEquipAwardDict = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 4, {})
    eatEquipAwardDictSuite = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 5, {})
    petEatItemAddExpPer = PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_EatItem)
    itemPack = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptItem)
    for i, index in enumerate(expIndexList):
@@ -173,6 +177,15 @@
                GameWorld.DebugLog("    tagPetEatEquip.txt,未配置该物品! eatItemID=%s, EquipColor=%s,EquipClass=%s" % (eatItemID, itemColor, itemClass))
                continue
            baseExp = ipyData.GetExp()
            equipAwardDict = eatEquipAwardDictSuite if eatItem.GetSuiteID() else eatEquipAwardDict
            if str(itemColor) in equipAwardDict:
                awardItemList = equipAwardDict[str(itemColor)]
                for awardID, awardCount in awardItemList:
                    awardItemDict[awardID] = awardItemDict.get(awardID, 0) + awardCount
                GameWorld.DebugLog("分解装备额外奖励: eatEquip=%s,itemColor=%s,suiteID=%s,awardItemList=%s total:%s"
                                   % (eatItem.GetItemTypeID(), itemColor, eatItem.GetSuiteID(), awardItemList, awardItemDict))
        else:
            GameWorld.ErrLog('    不可分解的道具index=%s eatItemID=%s'%(index, eatItemID))
            continue
@@ -192,7 +205,7 @@
        totalAddExp += totalAddExp * petEatItemAddExpPer / ChConfig.Def_MaxRateValue
            
    PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DecomposeEquip, allitemCnt)
    return eatItemList, totalAddExp, allitemCnt
    return eatItemList, totalAddExp, allitemCnt, awardItemDict
##获取吞噬结果