From 291e33ad90c500c8ba09add156667ed92c48dc51 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 18 九月 2020 10:36:49 +0800 Subject: [PATCH] 8424 【主干】【长尾】【BT】极品寻宝修改 / 【后端】极品寻宝修改(开放装备寻宝,寻宝支持配置不同的货币消耗类型,修复没有配置每X次保底必出时无法寻宝bug) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py index 33b10b6..85a8193 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTreasure.py @@ -138,13 +138,14 @@ # 仙玉寻宝 else: - costGoldList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 2) # 消耗仙玉列表 + costGoldList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 2) # 消耗货币列表 + costGoldType = IpyGameDataPY.GetFuncCfg(TreasureSet2, 4) # 消耗货币类型 costGold = costGoldList[treasureIndex] if not costGold: GameWorld.ErrLog("该寻宝类型索引不支持消耗仙玉寻宝!treasureType=%s,treasureIndex=%s" % (treasureType, treasureIndex), playerID) return - if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold): + if not PlayerControl.HaveMoney(curPlayer, costGoldType, costGold): return ipyData = IpyGameDataPY.InterpolationSearch("TreasureHouse", "MinLV", playerLV, {"TreasureType":treasureType}) @@ -191,7 +192,7 @@ gridNumRateList = beSureCountDict[updTreasureCount] gridNum = GameWorld.GetResultByRandomList(gridNumRateList) GameWorld.DebugLog("到达次数必出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID) - elif updTreasureCount % ensureCount == 0: + elif updTreasureCount % ensureCount == 0 and ensureRateList: gridNumRateList = ensureRateList gridNum = GameWorld.GetResultByRandomList(gridNumRateList) GameWorld.DebugLog("满次数保底出,updTreasureCount=%s,gridNumRateList=%s,gridNum=%s" % (updTreasureCount, gridNumRateList, gridNum), playerID) @@ -215,7 +216,7 @@ # 3. 次数保底 ensureGridNumList = [] - if updTreasureCount / ensureCount > curTreasureCount / ensureCount: + if updTreasureCount / ensureCount > curTreasureCount / ensureCount and ensureRateList: for gridInfo in ensureRateList: ensureGridNumList.append(gridInfo[1]) gridNum = GameWorld.GetResultByRandomList(ensureRateList) @@ -315,8 +316,8 @@ PlayerControl.PayMoney(curPlayer, moneyType, lackCountCostMoney, ChConfig.Def_Cost_Treasure, infoDict, lackCount) else: infoDict = {"TreasureType":treasureType, "TreasureIndex":treasureIndex} - PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold, ChConfig.Def_Cost_Treasure, infoDict) - GameWorld.DebugLog("扣除仙玉,costGold=%s" % costGold, playerID) + PlayerControl.PayMoney(curPlayer, costGoldType, costGold, ChConfig.Def_Cost_Treasure, infoDict) + GameWorld.DebugLog("扣除货币,costGoldType=%s,costGold=%s" % (costGoldType, costGold), playerID) # 加数据 PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TreasureCount % (treasureType, isFreeType), updTreasureCount) -- Gitblit v1.8.0