From aa998dda71c863ede84cb37de2c70b85c2c546ec Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 16 五月 2019 17:12:17 +0800
Subject: [PATCH] 3335 任务反馈

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

diff --git a/System/MainInterfacePanel/TaskFeedbackModel.cs b/System/MainInterfacePanel/TaskFeedbackModel.cs
index 0e20f4d..04b936f 100644
--- a/System/MainInterfacePanel/TaskFeedbackModel.cs
+++ b/System/MainInterfacePanel/TaskFeedbackModel.cs
@@ -79,6 +79,25 @@
                             }
                         }
                         break;
+                    case TaskFeedbackType.ReikiPoint:
+                        {
+                            if (!string.IsNullOrEmpty(config.reikiRoot))
+                            {
+                                var json = LitJson.JsonMapper.ToObject(config.reikiRoot);
+                                feedback.reikiRoots = new Dictionary<int, List<int[]>>();
+                                foreach (var jobKey in json.Keys)
+                                {
+                                    var job = int.Parse(jobKey);
+                                    var intArray = LitJson.JsonMapper.ToObject<int[][]>(json[jobKey].ToJson());
+                                    feedback.reikiRoots.Add(job, new List<int[]>());
+                                    for (int i = 0; i < intArray.Length; i++)
+                                    {
+                                        feedback.reikiRoots[job].Add(intArray[i]);
+                                    }
+                                }
+                            }
+                        }
+                        break;
                 }
 
                 m_TaskFeedbacks.Add(config.taskId, feedback);
@@ -240,6 +259,20 @@
                 case TaskFeedbackType.SideTask:
                     return IsSatisfySideTask(feedback.sideTasks, out condition);
                 case TaskFeedbackType.ReikiPoint:
+                    {
+                        if (feedback.reikiRoots != null)
+                        {
+                            var job = PlayerDatas.Instance.baseData.Job;
+                            var reikiRoots = feedback.reikiRoots[job];
+                            foreach (var reikiRoot in reikiRoots)
+                            {
+                                if (reikiRootModel.GetReikiRootPoint(reikiRoot[0]) < reikiRoot[1])
+                                {
+                                    return false;
+                                }
+                            }
+                        }
+                    }
                     return reikiRootModel.GetReikiRootTotalPoint() >= config.condition;
                 case TaskFeedbackType.Equip:
                     {
@@ -311,6 +344,7 @@
         public List<int[]> sideTasks;
         public int[] equipCondition;
         public List<Item> items;
+        public Dictionary<int, List<int[]>> reikiRoots;
 
         public int IndexOfSideTasks(int taskId)
         {

--
Gitblit v1.8.0