Exemplo n.º 1
0
    public void InitElementSkill_Info(int skillid)
    {
        Tab_CabalFellowElementSkill tabSkill = TableManager.GetCabalFellowElementSkillByID(skillid, 0);

        if (tabSkill == null)
        {
            return;
        }

        Tab_SkillEx tabSkillEx = TableManager.GetSkillExByID(skillid, 0);

        if (tabSkillEx == null)
        {
            return;
        }

        Tab_SkillBase tabBase = TableManager.GetSkillBaseByID(tabSkillEx.BaseId, 0);

        if (tabBase == null)
        {
            return;
        }

        m_TallentSkillId = GlobeVar.INVALID_ID;
        m_ElementSkillId = skillid;

        m_NameLabel.text = tabBase.Name;
        m_NameLabel.gameObject.SetActive(true);

        Tab_CabalFellowElementSkill tabNextSkill = TableManager.GetCabalFellowElementSkillByID(tabSkill.NextSkillId, 0);

        if (tabNextSkill == null)
        {
            m_ExpLabel.text = "MAX";
        }
        else
        {
            m_ExpLabel.text = StrDictionary.GetClientDictionaryString("#{10321}", GameManager.gameManager.PlayerDataPool.BackPack.GetItemCountByDataId(tabNextSkill.NeedBookId), tabNextSkill.NeedBookCount);
        }
        m_ExpLabel.gameObject.SetActive(true);

        m_SkillIcon.spriteName = tabBase.Icon;
        m_SkillIcon.gameObject.SetActive(true);

        m_QualityPic.spriteName = FellowTool.GetFellowElementSkillQualityPic(skillid);

        m_LevelLabel.text = FellowTool.GetFellowElementLevelText(skillid);
        m_LevelLabel.gameObject.SetActive(true);

        m_FlagLabel.gameObject.SetActive(false);
        m_LockSprite.SetActive(false);

        if (m_LevelUpButton != null)
        {
            m_LevelUpButton.SetActive(tabSkill.NextSkillId != GlobeVar.INVALID_ID);
        }

        updateElementRemindPoint(skillid);
        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().UpdateDevelopRemindPoint();
        }
    }