| | |
| | | import ItemControler
|
| | | import IPY_GameWorld
|
| | | import NetPackCommon
|
| | | import PlayerBeauty
|
| | | import PlayerArena
|
| | | import PlayerLLMJ
|
| | | import ItemCommon
|
| | |
| | | dropAppointEquipDict = IpyGameDataPY.GetFuncEvalCfg("MainDropAppoint", 1, {})
|
| | | appointDropCntMax = max(dropAppointEquipDict) if dropAppointEquipDict else 0
|
| | |
|
| | | lastSureOutNeed = ipyData.GetLastSureOutNeed() # 最后一档保底必出
|
| | | |
| | | for index in range(dropEquipCnt):
|
| | | bossType = bossTypeList[index % len(bossTypeList)]
|
| | | if bossType not in bossTypeDropRateDict:
|
| | | continue
|
| | | colorRateList = bossTypeDropRateDict.get(bossType, [])
|
| | | GameWorld.DebugLog("bossType=%s,colorRateList=%s,totalRate=%s" % (bossType, colorRateList, totalRate), playerID)
|
| | | lastColorEquipLucky = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_LastColorEquipLucky)
|
| | | GameWorld.DebugLog("lastColorEquipLucky=%s/%s,bossType=%s,colorRateList=%s,totalRate=%s" % (lastColorEquipLucky, lastSureOutNeed, bossType, colorRateList, totalRate), playerID)
|
| | |
|
| | | setAttrDict = None
|
| | | appointDropEquipCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_AppointDropEquipCnt) + 1
|
| | |
| | | setAttrDict[ShareDefine.Def_CItemKey_AppointID] = appointID
|
| | | GameWorld.DebugLog("定制掉落第%s次: equipID=%s,setAttrDict=%s" % (appointDropEquipCnt, randEquipID, setAttrDict))
|
| | | else:
|
| | | itemColor = GameWorld.GetResultByRandomList(colorRateList)
|
| | | lastColor = colorRateList[-1][1]
|
| | | if lastSureOutNeed and lastColorEquipLucky >= lastSureOutNeed:
|
| | | itemColor = lastColor
|
| | | GameWorld.DebugLog("保底必出最后一档品质: %s,lastColorEquipLucky=%s/%s" % (itemColor, lastColorEquipLucky, lastSureOutNeed))
|
| | | else:
|
| | | itemColor = GameWorld.GetResultByRandomList(colorRateList)
|
| | | if itemColor == lastColor or not lastSureOutNeed:
|
| | | lastColorEquipLucky = 0
|
| | | if not itemColor:
|
| | | continue
|
| | | equipIDList = NPCCommon.__GetEquipIDList(0, color=itemColor, placeList=ChConfig.Def_MainEquipPlaces, findType="MainEquipDrop")
|
| | |
| | | if not ItemControler.DoLogic_PutItemInPack(curPlayer, curItem, packIndexList=[IPY_GameWorld.rptIdentify]):
|
| | | continue
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_LastColorEquipLucky, lastColorEquipLucky)
|
| | | |
| | | unXiantaoCntEquip -= dropOneNeed
|
| | | PlayerControl.SetUnXiantaoCntEquip(curPlayer, unXiantaoCntEquip)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_UnXiantaoCntEquip, unXiantaoCntEquip)
|