From faeca70d5c95ccb4744931a176f671c7836b1a72 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 10 五月 2024 17:25:06 +0800
Subject: [PATCH] 10054 【后端】任务系统(是否完成任务改为领取完奖励才算;福地采集任务类型增加进度改为开始采集就算;)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
index e0241f6..5d352a8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerTask.py
@@ -256,21 +256,21 @@
 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:
-        finishTaskID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TaskIDLast % taskGroup)
-        
+    #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:
         return True
     
@@ -310,6 +310,8 @@
         
     if not __giveNewTask(curPlayer, taskGroup):
         SyncTaskInfo(curPlayer, [taskGroup])
+        
+    GameFuncComm.DoFuncOpenLogic(curPlayer, [taskID])
     return
 
 def SyncTaskInfo(curPlayer, taskGroupList=None):

--
Gitblit v1.8.0