From 4702677a47e0e414d0d82f8014400a87fdfad388 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 05 七月 2019 09:48:35 +0800
Subject: [PATCH] 3335 任务反馈修改

---
 System/MainInterfacePanel/TaskFeedbackModel.cs |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/System/MainInterfacePanel/TaskFeedbackModel.cs b/System/MainInterfacePanel/TaskFeedbackModel.cs
index bc257be..621271b 100644
--- a/System/MainInterfacePanel/TaskFeedbackModel.cs
+++ b/System/MainInterfacePanel/TaskFeedbackModel.cs
@@ -87,6 +87,15 @@
                         }
                         break;
                     case TaskFeedbackType.SkyTowerFightPoint:
+                        {
+                            if (!string.IsNullOrEmpty(config.reikiRoot))
+                            {
+                                var point = 0;
+                                int.TryParse(config.reikiRoot, out point);
+                                feedback.totalPoints = point;
+                            }
+                        }
+                        break;
                     case TaskFeedbackType.ReikiPoint:
                         {
                             if (!string.IsNullOrEmpty(config.reikiRoot))
@@ -440,22 +449,9 @@
                         var skyTowerConfig = SkyTowerConfig.Get(config.condition);
                         if (skyTowerConfig != null)
                         {
-                            if (feedback.reikiRoots != null && PlayerDatas.Instance.baseData.FightPoint < skyTowerConfig.fightPower)
+                            if (feedback.totalPoints > 0 && PlayerDatas.Instance.baseData.FightPoint < skyTowerConfig.fightPower)
                             {
-                                var job = PlayerDatas.Instance.baseData.Job;
-                                var reikiRoots = feedback.reikiRoots[job];
-                                foreach (var reikiRoot in reikiRoots)
-                                {
-                                    if (reikiRootModel.GetReikiRootPoint(reikiRoot[0]) < reikiRoot[1])
-                                    {
-                                        condition = 1;
-                                    }
-                                    else
-                                    {
-                                        condition = 0;
-                                    }
-                                    break;
-                                }
+                                condition = reikiRootModel.GetReikiRootTotalPointWithFree() >= feedback.totalPoints ? 0 : 1;
                                 return false;
                             }
                             else
@@ -632,6 +628,7 @@
         public List<Item> items;
         public Dictionary<int, List<int[]>> reikiRoots;
         public List<int[]> failFuns;
+        public int totalPoints;
 
         public int IndexOfSideTasks(int taskId)
         {

--
Gitblit v1.8.0