From eb9539865f913537a2db2577b861dea5b7c83121 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 05 七月 2019 17:43:21 +0800
Subject: [PATCH] 7885 子 【开发】【主干】自动任务修改 / 【前端】【主干】自动任务修改

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

diff --git a/System/MainInterfacePanel/TaskModel.cs b/System/MainInterfacePanel/TaskModel.cs
index 05c7fde..0f540b2 100644
--- a/System/MainInterfacePanel/TaskModel.cs
+++ b/System/MainInterfacePanel/TaskModel.cs
@@ -147,6 +147,8 @@
 
     List<int[]> priorityTaskChains = new List<int[]>();
 
+    List<int> allowAutoTaskMapIds = new List<int>();
+
     private float mainTaskAutoWaitTime = 0f;
     public readonly TaskWait taskWait = new TaskWait();
 
@@ -167,6 +169,12 @@
         TaskAutoLv = int.Parse(Task_Auto.Numerical1);
         TaskAutoTime = int.Parse(Task_Auto.Numerical2);
         mainTaskAutoWaitTime = int.Parse(Task_Auto.Numerical3) / 1000f;
+        var mapIds = ConfigParse.GetMultipleStr<int>(Task_Auto.Numerical4);
+        if (mapIds != null && mapIds.Length > 0)
+        {
+            allowAutoTaskMapIds.AddRange(mapIds);
+        }
+
         FairyAuTaskCount_Day = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical1.Split('|')[1].Split('_')[1]);
         FairyAuTaskCount_Round = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical2.Split('|')[1].Split('_')[1]);
 
@@ -1448,6 +1456,19 @@
             }
         }
 
+        if (!allowAutoTaskMapIds.Contains(PlayerDatas.Instance.baseData.MapID))
+        {
+            yield break;
+        }
+
+        if (_hero != null)
+        {
+            if (MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.Boss))
+            {
+                yield break;
+            }
+        }
+
         if (AdventureStage.Instance.IsInAdventureStage)
         {
             yield break;

--
Gitblit v1.8.0