| | |
| | | GameWorld.DebugLog("玩家寻宝: treasureType=%s,treasureIndex=%s,costType=%s,playerLV=%s"
|
| | | % (treasureType, treasureIndex, costType, playerLV), playerID)
|
| | |
|
| | | if treasureType == 1:
|
| | | return
|
| | | TreasureSet1 = "TreasureSet1%s" % treasureType
|
| | | TreasureSet2 = "TreasureSet2%s" % treasureType
|
| | | treasureCountList = IpyGameDataPY.GetFuncEvalCfg(TreasureSet1, 1) # 寻宝获得个数列表
|
| | |
| | | if lackCount > 0:
|
| | | lackCountCostMoney = ItemCommon.GetAutoBuyItemNeedGold({costItemID:lackCount})
|
| | | if lackCountCostMoney:
|
| | | moneyType = IPY_GameWorld.TYPE_Price_Gold_Money
|
| | | moneyType = IPY_GameWorld.TYPE_Price_Gold_Paper
|
| | | infoDict = {ChConfig.Def_Cost_Reason_SonKey:costItemID}
|
| | | if not PlayerControl.HaveMoney(curPlayer, moneyType, lackCountCostMoney):
|
| | | return
|
| | |
| | | GameWorld.ErrLog("该寻宝类型索引不支持消耗仙玉寻宝!treasureType=%s,treasureIndex=%s" % (treasureType, treasureIndex), playerID)
|
| | | return
|
| | |
|
| | | if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Money, costGold):
|
| | | if not PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold):
|
| | | return
|
| | |
|
| | | ipyData = IpyGameDataPY.InterpolationSearch("TreasureHouse", "MinLV", playerLV, {"TreasureType":treasureType})
|
| | |
| | | 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_Money, costGold, ChConfig.Def_Cost_Treasure, infoDict)
|
| | | PlayerControl.PayMoney(curPlayer, IPY_GameWorld.TYPE_Price_Gold_Paper, costGold, ChConfig.Def_Cost_Treasure, infoDict)
|
| | | GameWorld.DebugLog("扣除仙玉,costGold=%s" % costGold, playerID)
|
| | |
|
| | | # 加数据
|