| | |
| | | itemID = GameWorld.ToIntDef(curConditionNode.GetAttribute("itemID"), 0)
|
| | | if maxItemCnt and itemID: #未收集的道具个数乘以单价
|
| | | haveCnt = ItemControler.FindPlayerItemCountByItemID(curPlayer, IPY_GameWorld.rptItem, itemID)
|
| | | conditionValue = max(0, maxItemCnt-haveCnt)*value
|
| | | conditionValue = max(0, maxItemCnt-haveCnt)*conditionValue
|
| | |
|
| | | conditionType = curConditionNode.GetAttribute("type")
|
| | | moneyType = int(curConditionNode.GetAttribute("moneytype"))
|
| | | |
| | | #GameWorld.Log(' conditionValue=%s,maxItemCnt=%s,itemID=%s'%(conditionValue,maxItemCnt,itemID))
|
| | | |
| | | 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()
|
| | | |
| | | #付钱
|
| | | 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
|
| | |
| | | # @remarks <Set_Horsetotallv key="" />
|
| | | def DoType_Set_Horsetotallv(curPlayer, curMission, curActionNode):
|
| | | key = curActionNode.GetAttribute("key")
|
| | | questID = GameWorld.ToIntDef(curMission.GetProperty("id"), 0)
|
| | | if questID != 0:
|
| | | curMission = curPlayer.FindMission(questID)
|
| | | curMission.SetProperty(key, PlayerHorse.GetHorseSumLV(curPlayer))
|
| | | return
|
| | | #---------------------------------------------------------------------
|
| | |
| | | soulID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | return bool(PlayerMagicWeapon.GetIsActiveMWSoul(curPlayer, soulID))
|
| | |
|
| | | ##S级通关X层娲皇遗迹
|
| | | ##X级通关X层娲皇遗迹
|
| | | # @param None
|
| | | # @return None <Passqueenrelecs value="lineID"/>
|
| | | # @return None <Passqueenrelecs value="lineID" grade="grade"/>
|
| | | def ConditionType_Passqueenrelecs(curPlayer, curMission, curActionNode):
|
| | | lineID = GameWorld.ToIntDef(curActionNode.GetAttribute("value"), 0)
|
| | | grade = GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_Player_Dict_PlayerFBStar_MapId, lineID, False, [ChConfig.Def_FBMapID_QueenRelics])
|
| | | maxGrade = len(FBCommon.GetFBLineGrade(ChConfig.Def_FBMapID_QueenRelics, lineID))
|
| | | return grade >=maxGrade
|
| | | needGrade = GameWorld.ToIntDef(curActionNode.GetAttribute("grade"), 0)
|
| | | return grade >=needGrade
|
| | |
|
| | | ##坐骑总等级
|
| | | # @param None
|