| | |
| | | def __RunAnswerAction(curPlayer, curMission, answersNode):
|
| | | actionsNode = __FindAnswerActionNode(curPlayer, curMission, answersNode)
|
| | | if actionsNode == None or actionsNode.IsEmpty():
|
| | | GameWorld.Log('__RunAnswerAction找不到回答节点')
|
| | | GameWorld.DebugLog('__RunAnswerAction找不到回答节点--%s'%curMission.GetMissionID())
|
| | | return
|
| | |
|
| | | __DoAnswerActionNode(curPlayer, curMission, actionsNode)
|
| | |
| | |
|
| | | mission_1.SetProperty(Def_Around_AllCount, allCount)
|
| | | EventShell.EventRespons_RunTaskAllCnt(curPlayer, curMissionData.Type, allCount)
|
| | | GameWorld.DebugLog("删除任务allCount %s, RUNCOUNT=%s" % (allCount, RUNCOUNT))
|
| | | GameWorld.Log("删除任务allCount %s, RUNCOUNT=%s" % (allCount, RUNCOUNT))
|
| | |
|
| | |
|
| | | if allCount < RUNCOUNT:
|
| | |
| | | # @return 无
|
| | | # @remarks 跑环任务结束处理,删除或者随机下一个
|
| | | def __RunAroundMission(curPlayer, missionID, curMissionData, curActionNode):
|
| | | GameWorld.Log("__RunAroundMission----%s"%missionID)
|
| | | #任务完成,触发随机跑环
|
| | | run_event = GameWorld.ToIntDef(curActionNode.GetAttribute("run_around"), 0)
|
| | | firstMissionID = GameWorld.ToIntDef(curActionNode.GetAttribute("id"), 0)
|
| | |
| | |
|
| | |
|
| | | #总跑环次数已满,不可再做
|
| | | if run_event == Def_Run_Around_Over_1 and allCount >= RUNCOUNT:
|
| | | return
|
| | | if run_event == Def_Run_Around_Over_1:
|
| | | if allCount >= RUNCOUNT or aroundCount >= AROUNDCOUNT:
|
| | | return
|
| | |
|
| | | nextMissionID = 0
|
| | | nextMission = None
|
| | |
| | |
|
| | | if curMissionData.Type == QuestCommon.Def_Mission_Type_RunFamily:
|
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_TaskFRun, 1)
|
| | | if allCount < RUNCOUNT:
|
| | | nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | | # if allCount < RUNCOUNT:
|
| | | # nextMissionID = __OverRandRunAround(curPlayer, curMissionData)
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RunTaskNextMissionID % curMissionData.Type, nextMissionID)
|
| | |
|
| | |
|
| | |
|
| | |
| | | # @return 返回值无意义
|
| | | # @remarks 设置跑环任务奖励 <set_run_around_reward multiple="指定倍数" id_name="任务ID存储key" />
|
| | | def DoType_Set_Run_Around_Reward(curPlayer, curMission, curActionNode):
|
| | | curMissionID = curMission.GetMissionID()
|
| | | GameWorld.Log("DoType_Set_Run_Around_Reward---%s"%curMissionID)
|
| | | idNameStr = curActionNode.GetAttribute("id_name")
|
| | | if curMission and idNameStr != "":
|
| | | questID = GameWorld.ToIntDef(curMission.GetProperty(idNameStr), 0)
|
| | |
| | | if curMission == None:
|
| | | curMission = QuestCommon.AddNewMission(curPlayer, questID)
|
| | |
|
| | | curMissionID = curMission.GetMissionID()
|
| | | curMissionData = FindQuestFunc(curMissionID)
|
| | | if not curMissionData:
|
| | | return
|
| | |
| | | #给物品奖励
|
| | | itemInfo = []
|
| | | if item_id and item_count:
|
| | | AddEventItem(curPlayer, curMission, item_id, item_count, bind=True)
|
| | | itemInfo = [[item_id, item_count, True]]
|
| | | packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, 1)
|
| | | if 1 > packSpace:
|
| | | PlayerControl.NotifyCode(curPlayer, "UnionTask_Reward")
|
| | | PlayerControl.SendMailByKey("UnionTaskReward", [curPlayer.GetID()], itemInfo)
|
| | | else:
|
| | | AddEventItem(curPlayer, curMission, item_id, item_count, bind=True)
|
| | | |
| | | GameWorld.DebugLog("任务:%d 获得经验:%d,钱=%s,物品ID=%s,物品数量=%s"
|
| | | % (curMission.GetMissionID(), exp, money, item_id, item_count))
|
| | |
|
| | |
| | | #记录副本对应的任务ID
|
| | | if FBCommon.GetRecordMapID(mapID) in [ChConfig.Def_FBMapID_ClearDevil, ChConfig.Def_FBMapID_MagicWeapon]:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionID, curMission.GetMissionID())
|
| | | missionID = curMission.GetMissionID()
|
| | | curMissionData = FindQuestFunc(missionID)
|
| | | if curMissionData:
|
| | | missionType = curMissionData.Type
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_ReqFBMissionType, missionType)
|
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|