ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/Task.py
@@ -29,20 +29,33 @@
def OnExec(curPlayer, playerList):
    
    if len(playerList) == 0:
        GameWorld.DebugAnswer(curPlayer, "重置主线: Task 0")
        GameWorld.DebugAnswer(curPlayer, "设置任务: Task 任务ID 进度")
        return
    
    taskID = playerList[0]
    if not taskID:
        taskGroup = ChConfig.TaskGroup_Main
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskIDLast % taskGroup, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskID % taskGroup, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, 0)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, 0)
        PlayerTask.__giveNewTask(curPlayer, taskGroup)
        return
    taskValue = playerList[1] if len(playerList) > 1 else 0
    if taskID:
        ipyData = IpyGameDataPY.GetIpyGameData("Task", taskID)
        if not ipyData:
            GameWorld.DebugAnswer(curPlayer, "该任务ID不存在:%s" % taskID)
            return
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskID, taskID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue, taskValue)
    PlayerTask.SyncTaskInfo(curPlayer)
    GameWorld.DebugAnswer(curPlayer, "设置任务ID:%s  进度:%s" % (taskID, taskValue))
    ipyData = IpyGameDataPY.GetIpyGameData("Task", taskID)
    if not ipyData:
        GameWorld.DebugAnswer(curPlayer, "该任务ID不存在:%s" % taskID)
        return
    taskGroup = ipyData.GetTaskGroup()
    needValue = ipyData.GetNeedValue()
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskID % taskGroup, taskID)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, taskValue)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, ChConfig.TaskState_Doing)
    PlayerTask.SetTaskValue(curPlayer, ipyData, taskValue)
    curValue = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskValue % taskGroup)
    GameWorld.DebugAnswer(curPlayer, "设置任务ID:%s  进度:%s/%s" % (taskID, curValue, needValue))
    return