| | |
| | |
|
| | | infoDict = {ChConfig.Def_Cost_Reason_SonKey:recoverWay}
|
| | | for moneyType, moneyCnt in costMoneyDict.items():
|
| | | PlayerControl.PayMoney(curPlayer, moneyType, moneyCnt, ChConfig.Def_Cost_RecoverGain, infoDict)
|
| | | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, moneyType, moneyCnt)
|
| | | GameWorld.DebugLog(' moneyType=%s,moneyCnt=%s,costMoneyList=%s'%(moneyType, moneyCnt, costMoneyList))
|
| | | if not costMoneyList:
|
| | | return
|
| | | for mType, mCnt in costMoneyList:
|
| | | PlayerControl.PayMoney(curPlayer, mType, mCnt, ChConfig.Def_Cost_RecoverGain, infoDict)
|
| | |
|
| | |
|
| | | if totalExp > 0:
|
| | |
| | | costMoney = int(normalCostJade * recoverSecond / float(3600))
|
| | | else:
|
| | | costMoney = min(commonCnt, recoverCnt) * normalCostJade + vipCostJade * max(0, recoverCnt - commonCnt)
|
| | | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, ShareDefine.TYPE_Price_Gold_Paper_Money, costMoney)
|
| | | costMoneyList = [[ShareDefine.TYPE_Price_Gold_Paper_Money, costMoney]]
|
| | | else:
|
| | | costCopper = ipyData.GetCostCopper()
|
| | | if index == Def_TJGRecoverID:
|
| | | costMoney = int(costCopper * recoverSecond / float(3600))
|
| | | else:
|
| | | costMoney = recoverCnt * costCopper
|
| | | if PlayerControl.HaveMoney(curPlayer, IPY_GameWorld.TYPE_Price_Silver_Money, costMoney, False):
|
| | | costMoneyList = [[IPY_GameWorld.TYPE_Price_Silver_Money, costMoney]]
|
| | | else:
|
| | | costMoneyList = []
|
| | | |
| | | costMoneyList = [[IPY_GameWorld.TYPE_Price_Silver_Money, costMoney]]
|
| | | |
| | | return costMoneyList, recoverCnt
|
| | |
|
| | | def __GetCanRecoverCnt(curPlayer, index):
|