From a1e7374b1d3e6af8b8cf6bf6f59e3f9b101eb8be Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 21 八月 2018 10:43:12 +0800
Subject: [PATCH] 2621【前端】法宝、法宝之魂优化(优化潜力默认选中红点)

---
 UI/Common/FuncOpen.cs                     |   10 ++++++++--
 System/Treasure/TreasurePotentialPanel.cs |    9 +++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/System/Treasure/TreasurePotentialPanel.cs b/System/Treasure/TreasurePotentialPanel.cs
index 8b4f8c3..8a6165c 100644
--- a/System/Treasure/TreasurePotentialPanel.cs
+++ b/System/Treasure/TreasurePotentialPanel.cs
@@ -141,6 +141,15 @@
                 }
             }
 
+            for (int i = 0; i < m_Treasure.potentials.Count; i++)
+            {
+                if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id))
+                {
+                    _index = i;
+                    break;
+                }
+            }
+
             selectedPotential = m_Treasure.potentials[_index].id;
 
             for (int i = 0; i < potentialBriefInfos.Length; i++)
diff --git a/UI/Common/FuncOpen.cs b/UI/Common/FuncOpen.cs
index 6a11cdd..773e0aa 100644
--- a/UI/Common/FuncOpen.cs
+++ b/UI/Common/FuncOpen.cs
@@ -77,8 +77,14 @@
             for (int i = 0; i < vNetData.FuncCount; i++)
             {
                 var funcState = vNetData.FuncStateList[i];
-                bool opned = funcOpenState[funcState.FuncID];
-                funcOpenState[funcState.FuncID] = funcState.State == 1;
+                if (!funcOpenState.ContainsKey(funcState.FuncID))
+                {
+                    funcOpenState.Add(funcState.FuncID, funcState.State == 1);
+                }
+                else
+                {
+                    funcOpenState[funcState.FuncID] = funcState.State == 1;
+                }
                 if (OnFuncStateChangeEvent != null)
                 {
                     OnFuncStateChangeEvent(funcState.FuncID);

--
Gitblit v1.8.0