|  |  | 
 |  |  | #  @param playerList 参数列表 [ missionID]
 | 
 |  |  | #  @return None
 | 
 |  |  | #  @remarks 函数详细说明.
 | 
 |  |  | def OnExec(curPlayer, playerList):
 | 
 |  |  | def OnExec(curPlayer, paramList):
 | 
 |  |  |     
 | 
 |  |  |     if len(playerList) == 0:
 | 
 |  |  |     if len(paramList) == 0:
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "重置主线: Task 0")
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "输出任务: Task 1")
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "设置任务: Task 任务ID 进度")
 | 
 |  |  |         return
 | 
 |  |  |     
 | 
 |  |  |     taskID = playerList[0]
 | 
 |  |  |     taskID = paramList[0]
 | 
 |  |  |     if not taskID:
 | 
 |  |  |         taskGroup = ChConfig.TaskGroup_Main
 | 
 |  |  |         PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskIDLast % taskGroup, 0)
 | 
 |  |  | 
 |  |  |         PlayerTask.__giveNewTask(curPlayer, taskGroup)
 | 
 |  |  |         return
 | 
 |  |  |     
 | 
 |  |  |     taskValue = playerList[1] if len(playerList) > 1 else 0
 | 
 |  |  |     if len(paramList) == 1 and paramList[0] == 1:
 | 
 |  |  |         __ShowTask(curPlayer)
 | 
 |  |  |         return
 | 
 |  |  |      | 
 |  |  |     taskValue = paramList[1] if len(paramList) > 1 else 0
 | 
 |  |  |     ipyData = IpyGameDataPY.GetIpyGameData("Task", taskID)
 | 
 |  |  |     if not ipyData:
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "该任务ID不存在:%s" % taskID)
 | 
 |  |  | 
 |  |  |     GameWorld.DebugAnswer(curPlayer, "设置任务ID:%s  进度:%s/%s" % (taskID, curValue, needValue))
 | 
 |  |  |     return
 | 
 |  |  | 
 | 
 |  |  | def __ShowTask(curPlayer):
 | 
 |  |  |     taskCount = 0
 | 
 |  |  |     for taskGroup in ChConfig.TaskGroupList:
 | 
 |  |  |         taskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskID % taskGroup)
 | 
 |  |  |         if not taskID:
 | 
 |  |  |             continue
 | 
 |  |  |         ipyData = IpyGameDataPY.GetIpyGameData("Task", taskID)
 | 
 |  |  |         if not ipyData:
 | 
 |  |  |             continue
 | 
 |  |  |         curState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskState % taskGroup)
 | 
 |  |  |         curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskValue % taskGroup)
 | 
 |  |  |         needValue = ipyData.GetNeedValue()
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "任务ID:%s 进度:%s/%s 状态:%s" % (taskID, curValue, needValue, curState))
 | 
 |  |  |         taskCount += 1
 | 
 |  |  |          | 
 |  |  |     if not taskCount:
 | 
 |  |  |         GameWorld.DebugAnswer(curPlayer, "当前没有任务!")        | 
 |  |  |          | 
 |  |  |     return
 | 
 |  |  | 
 |