| | |
| | | dropEquipInfoList.append([classLV, color, dropCount])
|
| | | GameWorld.DebugLog(" 装备掉落结果: killCount=%s,[阶,颜色,件数]=%s" % (killCount, dropEquipInfoList), playerID)
|
| | |
|
| | | placeKeyListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 1)
|
| | | colorSuitRateDict = ipyDrop.GetEquipColorSuitInfo() # 装备颜色对应套装概率 {颜色:套装概率, ...}
|
| | | colorSuitPlaceKeyInfoDict = ipyDrop.GetEquipPartKeyRateInfo() # 装备部位集合信息 {(颜色,是否套装):部位集合key, ...}
|
| | | dropEquipIDDict = {}
|
| | |
| | | GameWorld.ErrLog("未配置颜色是否套装对应部位集合key! npcID=%s,color=%s,isSuit=%s" % (npcID, color, isSuit))
|
| | | continue
|
| | | placeKey = colorSuitPlaceKeyInfoDict[colorSuitKey]
|
| | | if placeKey not in placeKeyListDict:
|
| | | placeList = GetEquipPlaceByPlaceKey(placeKey)
|
| | | if not placeList:
|
| | | GameWorld.ErrLog("部位集合key不存在!npcID=%s,placeKey=%s" % (npcID, placeKey))
|
| | | continue
|
| | | placeList = placeKeyListDict[placeKey]
|
| | | randEquipIDList = __GetEquipIDList(npcID, classLV, color, isSuit, placeList, itemJobList)
|
| | | if not randEquipIDList:
|
| | | continue
|
| | |
| | | gradeColorSuitRateDict = fbGradeColorSuitRateDict[npcID]
|
| | | curGrade = curGrade if curGrade else GameWorld.GetGameFB().GetGameFBDictByKey(ChConfig.Def_FB_Grade)
|
| | |
|
| | | placeKeyListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 1)
|
| | | colorDropCntDict = {} # 装备颜色已经掉落数 {颜色:数量, ...}
|
| | | colorMaxDropCntDict = ipyDrop.GetEquipColorMaxDropCount() # {颜色:上限数量,...}
|
| | | colorSuitRateDict = ipyDrop.GetEquipColorSuitInfo() # 装备颜色对应套装概率 {颜色:套装概率, ...}
|
| | |
| | | continue
|
| | | placeKey = colorSuitPlaceKeyInfoDict[colorSuitKey]
|
| | | # 掉落优选部位处理
|
| | | if color == optColor and isSuit == optIsSuit and placeKey in placeKeyListDict and optPlace == None:
|
| | | optPlace = __GetOptimizationEquipPlace(dropPlayer, classLV, optColor, optIsSuit, placeKeyListDict[placeKey])
|
| | | if color == optColor and isSuit == optIsSuit and optPlace == None:
|
| | | allEquipPlaceList = GetAllEquipPlaceByPlaceKey(placeKey)
|
| | | #GameWorld.DebugLog(" 所有可优选部位: %s" % allEquipPlaceList)
|
| | | if allEquipPlaceList:
|
| | | optPlace = __GetOptimizationEquipPlace(dropPlayer, classLV, optColor, optIsSuit, allEquipPlaceList)
|
| | | jobList = itemJobList
|
| | | if placeKey not in placeKeyListDict:
|
| | | GameWorld.ErrLog("部位集合key不存在!npcID=%s,placeKey=%s" % (npcID, placeKey))
|
| | | continue
|
| | | if optPlace > 0:
|
| | | GameWorld.DebugLog(" 最终优选部位: %s" % optPlace)
|
| | | placeList = [optPlace]
|
| | | jobList = [dropPlayer.GetJob()]
|
| | | optPlace = 0 # 只有一次性的,置为0
|
| | | else:
|
| | | placeList = placeKeyListDict[placeKey]
|
| | | placeList = GetEquipPlaceByPlaceKey(placeKey)
|
| | | if not placeList:
|
| | | GameWorld.ErrLog("部位集合key不存在!npcID=%s,placeKey=%s" % (npcID, placeKey))
|
| | | continue
|
| | | randEquipIDList = __GetEquipIDList(npcID, classLV, color, isSuit, placeList, jobList)
|
| | | if not randEquipIDList:
|
| | | continue
|
| | |
| | | GameWorld.ErrLog("Boss没有掉落物品,NPCID=%s" % (npcID), dropPlayer.GetPlayerID())
|
| | | return dropIDList, auctionIDList, dropMoneyCnt, moneyValue
|
| | |
|
| | | def GetAllEquipPlaceByPlaceKey(placeKey):
|
| | | placeKeyRateListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 2) # {集合数字key1:[[概率1,部位1],...],...}
|
| | | if placeKey in placeKeyRateListDict:
|
| | | return [rateInfo[1] for rateInfo in placeKeyRateListDict[placeKey]]
|
| | | placeKeyListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 1) # {集合数字key1:[部位1,部位2,...],...}
|
| | | if placeKey in placeKeyListDict:
|
| | | return placeKeyListDict[placeKey]
|
| | | return []
|
| | |
|
| | | def GetEquipPlaceByPlaceKey(placeKey):
|
| | | ## 获取装备位集合对应的部位信息,集合ID重复时,优先饼图
|
| | | placeList = []
|
| | | placeKeyRateListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 2) # {集合数字key1:[[概率1,部位1],...],...}
|
| | | if placeKey in placeKeyRateListDict:
|
| | | placeRateList = placeKeyRateListDict[placeKey]
|
| | | place = GameWorld.GetResultByRandomList(placeRateList)
|
| | | if place:
|
| | | placeList = [place]
|
| | | #GameWorld.DebugLog(" 掉落部位概率集合: placeKey=%s,placeRateList=%s,place=%s,placeList=%s" % (placeKey, placeRateList, place, placeList))
|
| | | |
| | | if not placeList:
|
| | | placeKeyListDict = IpyGameDataPY.GetFuncCfg("EquipDropPartSets", 1) # {集合数字key1:[部位1,部位2,...],...}
|
| | | if placeKey in placeKeyListDict:
|
| | | placeList = placeKeyListDict[placeKey]
|
| | | #GameWorld.DebugLog(" 掉落部位均衡集合: placeKey=%s,placeList=%s" % (placeKey, placeList))
|
| | | |
| | | return placeList
|
| | |
|
| | | def __GetOptimizationEquipPlace(dropPlayer, classLV, optColor, optIsSuit, optPlaceList):
|
| | | ''' 获取掉落优选部位
|
| | | 几个默认规则
|