少年修仙传客户端代码仓库
client_linchunjie
2018-10-08 3f08266d9437cc544cc4f256d7229bbbde084bf8
System/Treasure/TreasurePotentialPanel.cs
@@ -34,6 +34,7 @@
        [SerializeField] Button m_RemoveBook;
        [SerializeField] ImageEx m_UpgradeImage;
        [SerializeField] Button m_Upgrade;
        [SerializeField] Image m_LevelUpRed;
        [SerializeField] UIEffect m_FailureEffect;
@@ -94,6 +95,9 @@
                        DisplayUpgradeCost();
                        DisplayGetSkill();
                        DisplaySuccessRatio();
                        m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
                             && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
                    }
                    else
                    {
@@ -142,14 +146,26 @@
                }
            }
            for (int i = 0; i < m_Treasure.potentials.Count; i++)
            if (m_Treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
            {
                if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id))
                if (m_Treasure.autoSelectPotential < m_Treasure.potentials.Count)
                {
                    _index = i;
                    break;
                    _index = m_Treasure.autoSelectPotential;
                }
            }
            else
            {
                for (int i = 0; i < m_Treasure.potentials.Count; i++)
                {
                    Item item;
                    if (model.SatisyPotentialLevelUp(_treasure.id, m_Treasure.potentials[i].id, out item))
                    {
                        _index = i;
                        break;
                    }
                }
            }
            selectedPotential = m_Treasure.potentials[_index].id;
@@ -272,6 +288,8 @@
            if (m_Treasure != null && _id == m_Treasure.skillLevelUpRedpoint.id)
            {
                DisplayAddBookRedpoint();
                m_LevelUpRed.gameObject.SetActive(m_Treasure.id == model.GetSkillLevelUpRedpointTreasure()
                    && m_Treasure.GetPotentialByIndex(m_Treasure.autoSelectPotential).id == selectedPotential);
            }
        }
@@ -615,7 +633,8 @@
                m_AddBookRedpoint.gameObject.SetActive(false);
                return;
            }
            bool levelUpHighSuccess = model.SatisyPotentialLevelUp(model.selectedTreasure, model.selectedPotential);
            Item item;
            bool levelUpHighSuccess = model.SatisyPotentialLevelUp(model.selectedTreasure, model.selectedPotential, out item);
            m_AddBookRedpoint.gameObject.SetActive(levelUpHighSuccess);
        }