From 5f813239de40124632cdb2882b1bbb9d178f2c4b Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期六, 16 三月 2019 16:52:36 +0800
Subject: [PATCH] 3335 任务修改

---
 System/MainInterfacePanel/TaskModel.cs |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/System/MainInterfacePanel/TaskModel.cs b/System/MainInterfacePanel/TaskModel.cs
index b8fe400..72ba6d1 100644
--- a/System/MainInterfacePanel/TaskModel.cs
+++ b/System/MainInterfacePanel/TaskModel.cs
@@ -130,6 +130,10 @@
     //----鍏充簬鍓嶆湡鏃犳搷浣滆嚜鍔ㄦ墽琛屼富绾�
     public int TaskAutoLv = 0;
     public int TaskAutoTime = 0;
+
+    public bool TaskOverBool = false;
+    private int Times = 0;
+    private int NeedWaitTime = 4;
     PackModel _playerPack;
     PackModel playerPack {
         get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
@@ -191,6 +195,7 @@
         GlobalTimeEvent.Instance.secondEvent += secondEvent;
         TaskAllocation.Instance.TaskTime = TimeUtility.ServerNow;
         AutomaticityBool = true;
+        TaskOverBool = false;
     }
 
 
@@ -237,6 +242,7 @@
                 int missionState = allMissionDict[MissionID].MissionState;
                 if (allMissionDict[MissionID].MissionState != MissionState && MissionState == 3 && AutomaticityBool)
                 {
+                    TaskOverBool = true;
                     if (CompletionOfTaskEvent != null)
                     {
                         CompletionOfTaskEvent(MissionID);
@@ -1568,6 +1574,22 @@
         else
         {
             IsGetOnBool = false;
+        }
+
+        if (TaskOverBool)
+        {
+            Times += 1;
+            if (Times >= NeedTime)
+            {
+                TaskOverBool = false;
+            }
+        }
+        else
+        {
+            if (Times != 0)
+            {
+                Times = 0;
+            }
         }
     }
 

--
Gitblit v1.8.0