xdh
2019-07-02 a37eb96d6acab1cee41fbaba5010285099ee0ae7
7724 【后端】【主干】分解获得仙丹材料的体验优化
1个文件已修改
20 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEquipDecompose.py
@@ -101,21 +101,21 @@
        awardRateList = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 2)
        resetItemIDList = IpyGameDataPY.GetFuncEvalCfg('EquipDecomposeAward', 3)
        giveCnt = updDecomposeCnt/perDecomposeCnt
        minCnt, minItemID = 0, 0
        for itemid in resetItemIDList:
            cnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemid)
            cnt += ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptWarehouse, itemid)
            if not minCnt or cnt < minCnt:
                minCnt = cnt
                minItemID = itemid
        giveItemIDDict = {}
        for _ in xrange(giveCnt):
            itmeID = GameWorld.GetResultByRandomList(awardRateList)
            if not itmeID:
                continue
            if itmeID in resetItemIDList: #给玩家拥有最少的材料
                minCnt, rItemID = 0, 0
                for itemid in resetItemIDList:
                    cnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemid)
                    cnt += ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptWarehouse, itemid)
                    if cnt and not minCnt or cnt < minCnt:
                        minCnt = cnt
                        rItemID = itemid
                if rItemID:
                    itmeID = rItemID
            if itmeID in resetItemIDList and minItemID: #给玩家拥有最少的材料
                itmeID = minItemID
                
            giveItemIDDict[itmeID] = giveItemIDDict.get(itmeID, 0) + 1
        if giveItemIDDict: