hxp
9 小时以前 c2d5e79d7266670f262f1d922fd0f357ac6a026c
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py
@@ -249,11 +249,9 @@
        beSureCountByIndexDict = beSureCountByIndexList[treasureIndex]
        maxIndexCount = min(9, max(beSureCountByIndexDict))
        curIndexCount = GameWorld.GetDataByDigitPlace(treasureCountEx, treasureIndex) + 1
    rateByIndexCount = 0 # 第x次x抽必出可产出个数
    rateByIndexCountList = []
    beSureCountByIndexCfg = []
    if curIndexCount <= maxIndexCount and curIndexCount in beSureCountByIndexDict:
        rateByIndexCountList = [[10000, beSureCountByIndexDict[curIndexCount]]]
        rateByIndexCount = 1 # 可扩展支持产出多个,暂定单次抽奖仅定制产出1个
        beSureCountByIndexCfg = beSureCountByIndexDict[curIndexCount]
        
    # 单抽产出优先级: 幸运物品 > 必出 > 保底 > 普通
    # 连抽没有优先级限制,只要满足条件即可产出
@@ -275,8 +273,17 @@
        
        curRateList = [] # 可能会改变饼图,每次抽奖使用新的饼图对象,不要改变配置的饼图概率
        
        # 第x次x抽必出,优先级最高,无视其他
        if not curRateList and beSureCountByIndexCfg:
            if tIndex == 0:
                curRateList = [[10000, beSureCountByIndexCfg[0]]]
            else:
                curRateList = beSureCountByIndexCfg[1]
            GameWorld.DebugLog("    【第x次x抽必出】: treasureIndex=%s,curIndexCount=%s,%s"
                               % (treasureIndex, curIndexCount, curRateList), playerID)
        # 满幸运必出
        if stageLuck and updLuck >= stageLuck and luckItemRateList:
        if not curRateList and stageLuck and updLuck >= stageLuck and luckItemRateList:
            curRateList = GetRemoveLimitGridRateList(luckItemRateList, gridNumCountInfo, gridNumMaxLimitInfo)
            GameWorld.DebugLog("    【满幸运必出饼图】: %s" % curRateList, playerID)
            
@@ -290,13 +297,6 @@
        if not curRateList and ensureCount and updTreasureCount % ensureCount == 0 and ensureRateList:
            curRateList = GetRemoveLimitGridRateList(ensureRateList, gridNumCountInfo, gridNumMaxLimitInfo)
            GameWorld.DebugLog("    【满%s次数必出饼图】: %s" % (ensureCount, curRateList), playerID)
        # 第x次x抽必出,优先级较低
        if not curRateList and rateByIndexCountList and rateByIndexCount > 0:
            rateByIndexCount -= 1
            curRateList = rateByIndexCountList
            GameWorld.DebugLog("    【第x次x抽必出】: treasureIndex=%s,curIndexCount=%s,rateByIndexCount=%s,%s"
                               % (treasureIndex, curIndexCount, rateByIndexCount, rateByIndexCountList), playerID)
            
        doCount = 0
        while doCount <= 50: # 限制最大次数