From ccdbc28cd6358b12d0ace0ec3b84b280ab817643 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期三, 22 八月 2018 14:13:58 +0800
Subject: [PATCH] fix:任务扣钱支持绑玉、仙玉组合扣钱
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
index 3459869..62699e6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/QuestRunner.py
@@ -1939,6 +1939,9 @@
conditionType = curConditionNode.GetAttribute("type")
moneyType = int(curConditionNode.GetAttribute("moneytype"))
+
+
+
goldValue = curPlayer.GetGold()
goldPaperValue = curPlayer.GetGoldPaper()
silverValue = PlayerControl.GetSilver(curPlayer)
@@ -1949,6 +1952,8 @@
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
@@ -3681,21 +3686,26 @@
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()
-
- #付钱
- if not PlayerControl.PayMoney(curPlayer, moneytype, value, ChConfig.Def_Cost_MissionDel, {"MissionID":curMissionID}):
+ costMoneyList = PlayerControl.HaveMoneyEx(curPlayer, moneytype, value)
+ if not costMoneyList:
GameWorld.Log("##付费异常,玩家金钱不足,任务missionID = %s" % (curMissionID) , curPlayer.GetPlayerID())
EventShell.DoExitEvent(curPlayer)
return
+ #付钱
+ 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
GameWorld.Login_Interface_GoldRec(curPlayer , 0 , 0 , 'MissionID_%s_Cost' % (curMissionID), moneytype, value)
return
--
Gitblit v1.8.0