| | |
| | | def __OnTaskFinish(curPlayer, taskGroup, taskID, taskIpyData):
|
| | | GameWorld.DebugLog("任务完成: taskGroup=%s,taskID=%s" % (taskGroup, taskID), curPlayer.GetPlayerID())
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TaskState % taskGroup, ChConfig.TaskState_Finish)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
|
| | | return
|
| | |
|
| | | def IsTaskFinish(curPlayer, taskID):
|
| | | ## 任务是否已完成
|
| | | ## 任务是否已完成 - 规定领奖才算完成
|
| | | ipyData = IpyGameDataPY.GetIpyGameData("Task", taskID)
|
| | | if not ipyData:
|
| | | return
|
| | | taskGroup = ipyData.GetTaskGroup()
|
| | | nowTaskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskID % taskGroup)
|
| | | if nowTaskID and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskState % taskGroup) == ChConfig.TaskState_Finish:
|
| | | finishTaskID = nowTaskID
|
| | | else:
|
| | | #nowTaskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskID % taskGroup)
|
| | | #if nowTaskID and curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskState % taskGroup) == ChConfig.TaskState_Finish:
|
| | | # finishTaskID = nowTaskID
|
| | | #else:
|
| | | # finishTaskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskIDLast % taskGroup)
|
| | | finishTaskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskIDLast % taskGroup)
|
| | |
|
| | | if taskID == finishTaskID:
|
| | |
| | |
|
| | | if not __giveNewTask(curPlayer, taskGroup):
|
| | | SyncTaskInfo(curPlayer, [taskGroup])
|
| | | |
| | | GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
|
| | | return
|
| | |
|
| | | def SyncTaskInfo(curPlayer, taskGroupList=None):
|