ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -21,6 +21,7 @@
import NetPackCommon
import PlayerGoldRush
import ChPyNetSendPack
import DataRecordPack
import ItemControler
import IPY_GameWorld
import GameFuncComm
@@ -38,11 +39,11 @@
        ipyDataMgr = IpyGameDataPY.IPY_Data()
        for index in xrange(ipyDataMgr.GetTaskCount()):
            ipyData = ipyDataMgr.GetTaskByIndex(index)
            taskGroup = ipyData.GetTaskGroup()
            tGroup = ipyData.GetTaskGroup()
            taskID = ipyData.GetTaskID()
            if taskGroup not in taskIDListDict:
                taskIDListDict[taskGroup] = []
            taskIDList = taskIDListDict[taskGroup]
            if tGroup not in taskIDListDict:
                taskIDListDict[tGroup] = []
            taskIDList = taskIDListDict[tGroup]
            if taskID not in taskIDList:
                taskIDList.append(taskID)
        IpyGameDataPY.SetConfigEx(key, taskIDListDict)
@@ -100,8 +101,9 @@
        
    return
def __giveNewTask(curPlayer, taskGroup=ChConfig.TaskGroup_Main):
def __giveNewTask(curPlayer, taskGroup=ChConfig.TaskGroup_Main, preTaskID=0):
    ## 给新任务
    # @param preTaskID: 上一个任务ID
    taskIDList = GetTaskIDList(taskGroup)
    if not taskIDList:
        return
@@ -136,6 +138,12 @@
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskValue % taskGroup, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, ChConfig.TaskState_Doing)
    GameWorld.DebugLog("接到新任务: taskGroup=%s,newTaskID=%s" % (taskGroup, newTaskID), playerID)
    # 额外记录接到任务
    if taskGroup == ChConfig.TaskGroup_Main:
        PlayerControl.SetMainTaskID(curPlayer, newTaskID)
    DataRecordPack.DR_Task(curPlayer, taskGroup, newTaskID, "new", {"preTaskID":preTaskID})
    return SetTaskValue(curPlayer, ipyData, taskValue)
def __GetTaskValue(curPlayer, ipyData):
@@ -347,7 +355,7 @@
        appointInfo[itemID] = appointID
    ItemControler.NotifyGiveAwardInfo(curPlayer, notifyAwardList, "Task", dataEx={"appointInfo":appointInfo})
    
    if not __giveNewTask(curPlayer, taskGroup):
    if not __giveNewTask(curPlayer, taskGroup, taskID):
        SyncTaskInfo(curPlayer, [taskGroup])
        
    GameFuncComm.DoFuncOpenLogic(curPlayer)