Exemplo n.º 1
0
    public List <KeyValuePair <int, int> > GetBattleBeActivitySkillExtendIDs()
    {
        List <KeyValuePair <int, int> > list = new List <KeyValuePair <int, int> >();

        if (this.passiveSkillInfoList == null || this.passiveSkillInfoList.get_Count() <= 0)
        {
            return(list);
        }
        for (int i = 0; i < this.passiveSkillInfoList.get_Count(); i++)
        {
            int id  = this.passiveSkillInfoList.get_Item(i).Id;
            int num = this.passiveSkillInfoList.get_Item(i).Lv;
            num = ((num <= 0) ? 1 : num);
            ArtifactSkill artifactSkillCfgDataByID = this.GetArtifactSkillCfgDataByID(id);
            if (artifactSkillCfgDataByID != null)
            {
                if (artifactSkillCfgDataByID.skillType == 2)
                {
                    for (int j = 0; j < artifactSkillCfgDataByID.effect.get_Count(); j++)
                    {
                        list.Add(new KeyValuePair <int, int>(artifactSkillCfgDataByID.effect.get_Item(j), num));
                    }
                }
            }
        }
        return(list);
    }
Exemplo n.º 2
0
    private void RefreshWeaponSkillDesc(int skillId, Artifact godData)
    {
        ArtifactSkill artifactSkill = DataReader <ArtifactSkill> .Get(skillId);

        if (artifactSkill != null)
        {
            ResourceManager.SetSprite(this.mSkillIcon, GameDataUtils.GetIcon(artifactSkill.icon));
            this.mTxSkillName.set_text(GameDataUtils.GetChineseContent(artifactSkill.name, false));
            this.mTxSkillTitle.set_text("技能描述:");
            this.mTxSkillDesc.set_text(GameDataUtils.GetChineseContent(artifactSkill.desc, false));
            this.mTxGetDesc.set_text(string.Format(GameDataUtils.GetChineseContent(godData.access, false), godData.activationParameter));
        }
    }
Exemplo n.º 3
0
    private void RefreshBeActivityDownDetail(int beActivitySkillID)
    {
        ArtifactSkill artifactSkill = DataReader <ArtifactSkill> .Get(beActivitySkillID);

        if (artifactSkill != null)
        {
            this.beActivitySkillNameText.set_text(GameDataUtils.GetChineseContent(artifactSkill.name, false));
            this.beActivityDownDescText.set_text(GameDataUtils.GetChineseContent(artifactSkill.desc, false));
            if (!SkillUIManager.Instance.CheckArtifactSkillIsUnlock(beActivitySkillID))
            {
                Text expr_51 = this.beActivityDownDescText;
                expr_51.set_text(expr_51.get_text() + "\n" + SkillUIManager.Instance.GetArtifactNameLockTipByID(beActivitySkillID));
            }
        }
    }
Exemplo n.º 4
0
    private void RefreshPassiveSkillData()
    {
        List <ArtifactSkill> allArtifactSkillCfgData = SkillUIManager.Instance.GetAllArtifactSkillCfgData();

        if (allArtifactSkillCfgData == null)
        {
            return;
        }
        for (int i = 0; i < allArtifactSkillCfgData.get_Count(); i++)
        {
            ArtifactSkill artifactSkill = allArtifactSkillCfgData.get_Item(i);
            Transform     transform     = null;
            if (i < this.beActivitySkillGridsTrans.get_childCount())
            {
                transform = this.beActivitySkillGridsTrans.GetChild(i);
            }
            if (transform == null)
            {
                GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("SkillPassiveBtnItem");
                instantiate2Prefab.set_name("SkillPassiveBtnItem" + i);
                instantiate2Prefab.get_transform().SetParent(this.beActivitySkillGridsTrans);
                instantiate2Prefab.GetComponent <RectTransform>().set_localScale(Vector3.get_one());
                instantiate2Prefab.GetComponent <ButtonCustom>().onClickCustom = new ButtonCustom.VoidDelegateObj(this.OnClickSelectPssiveSkillItem);
                instantiate2Prefab.SetActive(true);
                transform = instantiate2Prefab.get_transform();
            }
            if (transform == null)
            {
                return;
            }
            SkillPassiveBtnItem skillPassiveBtnItem = transform.GetComponent <SkillPassiveBtnItem>();
            if (skillPassiveBtnItem == null)
            {
                skillPassiveBtnItem = transform.get_gameObject().AddComponent <SkillPassiveBtnItem>();
            }
            skillPassiveBtnItem.UpdatePassiveSkillItem(artifactSkill);
            skillPassiveBtnItem.Selected = false;
            if ((this.currentSelectPassiveSkillID > 0 && this.currentSelectPassiveSkillID == artifactSkill.id) || (this.currentSelectPassiveSkillID <= 0 && i == 0))
            {
                this.RefreshSelectPassiveSkillItemData(skillPassiveBtnItem);
            }
        }
    }
Exemplo n.º 5
0
    public void UpdatePassiveSkillItem(ArtifactSkill artifactSkillCfg)
    {
        this.artifactSkillCfgData = artifactSkillCfg;
        if (artifactSkillCfg == null)
        {
            return;
        }
        if (!this.isInit)
        {
            this.InitUI();
        }
        this.skillID = artifactSkillCfg.id;
        ResourceManager.SetSprite(this.m_skillIcon, GameDataUtils.GetIcon(artifactSkillCfg.icon));
        bool flag = SkillUIManager.Instance.CheckArtifactSkillIsUnlock(this.skillID);

        this.m_goFrameMaskObj.SetActive(!flag);
        this.m_skillLvText.set_text(GameDataUtils.GetChineseContent(this.artifactSkillCfgData.name, false));
        this.Selected = false;
    }
Exemplo n.º 6
0
    private void ShowFightPower(Artifact data)
    {
        if (data.system == 4)
        {
            Artifact.SystemparameterPair systemparameterPair = data.systemParameter.Find((Artifact.SystemparameterPair e) => e.key == EntityWorld.Instance.EntSelf.TypeID);
            if (systemparameterPair != null)
            {
                ArtifactSkill artifactSkill = DataReader <ArtifactSkill> .Get(systemparameterPair.value);

                if (artifactSkill != null)
                {
                    this.ShowFightPower(artifactSkill.effect.get_Item(0));
                }
            }
        }
        else if (data.system == 5)
        {
            Artifact.SystemparameterPair systemparameterPair2 = data.systemParameter.Find((Artifact.SystemparameterPair e) => e.key == EntityWorld.Instance.EntSelf.TypeID);
            if (systemparameterPair2 != null)
            {
                this.ShowFightPower(systemparameterPair2.value);
            }
        }
    }
Exemplo n.º 7
0
    public string GetArtifactNameLockTipByID(int id)
    {
        ArtifactSkill artifactSkillCfgDataByID = this.GetArtifactSkillCfgDataByID(id);

        if (artifactSkillCfgDataByID == null)
        {
            return(string.Empty);
        }
        string result     = string.Empty;
        int    activation = artifactSkillCfgDataByID.activation;

        if (activation > 0)
        {
            Artifact artifact = DataReader <Artifact> .Get(activation);

            string text = string.Empty;
            if (artifact != null)
            {
                text = GameDataUtils.GetChineseContent(artifact.name, false);
            }
            result = string.Format(GameDataUtils.GetChineseContent(518005, false), text);
        }
        return(result);
    }
Exemplo n.º 8
0
    private void RefreshDesc(Artifact data)
    {
        this.mTxName.set_text(GameDataUtils.GetChineseContent(data.name, false));
        ResourceManager.SetSprite(this.mRectIcon.GetComponent <Image>(), GameDataUtils.GetIcon(this.mGodData.model));
        string text  = string.Empty;
        string text2 = string.Empty;

        Artifact.SystemparameterPair systemparameterPair = data.systemParameter.Find((Artifact.SystemparameterPair e) => e.key == EntityWorld.Instance.EntSelf.TypeID);
        if (systemparameterPair != null || data.system == 5)
        {
            switch (data.system)
            {
            case 1:
            {
                Skill skill = DataReader <Skill> .Get(systemparameterPair.value);

                if (skill != null)
                {
                    text  = "激活技能:" + GameDataUtils.GetChineseContent(skill.name, false);
                    text2 = GameDataUtils.GetChineseContent(skill.describeId, false);
                }
                break;
            }

            case 2:
            {
                Runes runes = DataReader <Runes> .Get(systemparameterPair.value);

                Runes_basic runes_basic = DataReader <Runes_basic> .Get(systemparameterPair.value);

                if (runes != null && runes_basic != null)
                {
                    text  = "激活符文:" + GameDataUtils.GetChineseContent(runes_basic.name, false);
                    text2 = GameDataUtils.GetChineseContent(runes.desc, false);
                }
                break;
            }

            case 3:
            {
                SystemOpen systemOpen = DataReader <SystemOpen> .Get(systemparameterPair.value);

                if (systemOpen != null)
                {
                    text2 = GameDataUtils.GetChineseContent(systemOpen.bewrite, false);
                }
                break;
            }

            case 4:
            {
                ArtifactSkill artifactSkill = DataReader <ArtifactSkill> .Get(systemparameterPair.value);

                if (artifactSkill != null)
                {
                    text  = "激活被动:" + GameDataUtils.GetChineseContent(artifactSkill.name, false);
                    text2 = GameDataUtils.GetChineseContent(artifactSkill.desc, false);
                }
                break;
            }

            case 5:
                text  = "激活属性:" + GameDataUtils.GetChineseContent(data.skillName, false);
                text2 = GameDataUtils.GetChineseContent(data.skillExplain, false);
                break;
            }
        }
        this.mTxTitle.set_text(text);
        this.mTxContent.set_text(text2);
    }