| | |
| | |
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | moneyType = int(curConditionNode.GetAttribute("moneytype"))
|
| | | |
| | | |
| | | |
| | | goldValue = curPlayer.GetGold()
|
| | | goldPaperValue = curPlayer.GetGoldPaper()
|
| | | silverValue = PlayerControl.GetSilver(curPlayer)
|
| | |
| | | return QuestRunnerValue.GetEval(conditionType, goldPaperValue, conditionValue)
|
| | | elif moneyType == IPY_GameWorld.TYPE_Price_Silver_Money:
|
| | | return QuestRunnerValue.GetEval(conditionType, silverValue, conditionValue)
|
| | | elif moneyType == ShareDefine.TYPE_Price_Gold_Paper_Money:
|
| | | return QuestRunnerValue.GetEval(conditionType, goldValue + goldPaperValue, conditionValue)
|
| | | else:
|
| | | GameWorld.Log("任务 = %s , moneytype = %s填错拉" % (curMission.GetMissionID() , moneyType) , curPlayer.GetPlayerID())
|
| | | return
|
| | |
| | |
|
| | | moneytype = int(curActionNode.GetAttribute("moneytype"))
|
| | |
|
| | | if moneytype not in ChConfig.Def_MoneyType_All:
|
| | | GameWorld.Log("##异常moneytype = %s填错拉" % (moneytype))
|
| | | return
|
| | | # if moneytype not in ChConfig.Def_MoneyType_All:
|
| | | # GameWorld.Log("##异常moneytype = %s填错拉" % (moneytype))
|
| | | # return
|
| | |
|
| | | curMissionID = 0
|
| | | if curMission == None:
|
| | | curMissionID = 0
|
| | | else:
|
| | | curMissionID = curMission.GetMissionID()
|
| | | |
| | | costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, moneytype, value)
|
| | | if not costMoneyList:
|
| | | GameWorld.Log("##付费异常,玩家金钱不足,任务missionID = %s" % (curMissionID) , curPlayer.GetPlayerID())
|
| | | EventShell.DoExitEvent(curPlayer)
|
| | | return
|
| | | #付钱
|
| | | if not PlayerControl.PayMoney(curPlayer, moneytype, value, ChConfig.Def_Cost_MissionDel, {"MissionID":curMissionID}):
|
| | | for moneyType, moneyNum in costMoneyList:
|
| | | if not PlayerControl.PayMoney(curPlayer, moneyType, moneyNum, ChConfig.Def_Cost_MissionDel, {"MissionID":curMissionID}):
|
| | | GameWorld.Log("##付费异常,玩家金钱不足,任务missionID = %s" % (curMissionID) , curPlayer.GetPlayerID())
|
| | | EventShell.DoExitEvent(curPlayer)
|
| | | return
|