예제 #1
0
    private void UpdateSelectSkillDetail(int skillID)
    {
        Skill skill = DataReader <Skill> .Get(skillID);

        if (skill == null)
        {
            return;
        }
        base.FindTransform("SkillBaseAttr").get_gameObject().SetActive(true);
        base.FindTransform("SkillRunesAttrs").get_gameObject().SetActive(false);
        this.rightItemTitleText.set_text(GameDataUtils.GetChineseContent(skill.name, false));
        this.rightDownDescText.set_text(GameDataUtils.GetChineseContent(skill.describeId, false));
        base.FindTransform("txCD").GetComponent <Text>().set_text(string.Format("(冷却时间:{0}秒)", (float)skill.cd * 0.001f));
        JiNengShengJiBiao skillUpgradeCfgDataByID = SkillUIManager.Instance.GetSkillUpgradeCfgDataByID(skillID);

        if (skillUpgradeCfgDataByID != null)
        {
            base.FindTransform("txBaseDamage").GetComponent <Text>().set_text(string.Format("基础伤害:<color=#ff7d4b>{0:P1}</color>", skillUpgradeCfgDataByID.skillDate1));
        }
        base.FindTransform("txFuwen").GetComponent <Text>().set_text("符文伤害加成:<color=#ff7d4b>" + (float)SkillRuneManager.Instance.GetEmbedRuneStoneAddAttrToSkill(skillID) * 0.1f + "%</color>");
        this.runeStoneUpgradeFullImg.get_gameObject().SetActive(false);
        this.runeStoneUnLockImg.get_gameObject().SetActive(false);
        this.rightCanUpgradeRoot.SetActive(false);
        this.runeStoneLockLVText.set_text(string.Empty);
        this.runeStoneLockNeedPreText.set_text(string.Empty);
    }
예제 #2
0
    private void RefreshSelectSkillDesc(int skillID)
    {
        Skill skill = DataReader <Skill> .Get(skillID);

        if (skill == null)
        {
            return;
        }
        this.skillNameText.set_text(GameDataUtils.GetChineseContent(skill.name, false));
        this.skillDescText.set_text(GameDataUtils.GetChineseContent(skill.describeId, false));
        this.skillCdText.set_text(string.Format("冷却时间:<color=red>{0}秒</color>", (float)skill.cd * 0.001f));
        JiNengShengJiBiao skillUpgradeCfgDataByID = SkillUIManager.Instance.GetSkillUpgradeCfgDataByID(skillID);

        if (skillUpgradeCfgDataByID != null)
        {
            this.skillBasicDamageText.set_text(string.Format("基础伤害:<color=#ff7d4b>{0:P1}</color>", skillUpgradeCfgDataByID.skillDate1));
        }
        bool flag = SkillUIManager.Instance.CheckSkillIsUnLock(skillID);

        base.FindTransform("SkillUnLockImg").get_gameObject().SetActive(!flag);
        bool flag2 = SkillUIManager.Instance.CheckSkillIsCanUpgrade(skillID);

        base.FindTransform("SkillLvFullImg").get_gameObject().SetActive(!flag2 && flag);
        bool flag3 = EntityWorld.Instance.EntSelf.Lv >= SkillUIManager.Instance.SkillCanUpLevel;

        base.FindTransform("SkillCanNotUp").get_gameObject().SetActive(flag && !flag3);
        if (flag && flag2 && flag3)
        {
            this.SetSkillUpgradeBtnState(true);
            base.FindTransform("SkillUpItemInfo").get_gameObject().SetActive(true);
            JiNengShengJiBiao skillNextLvCfgDataByID = SkillUIManager.Instance.GetSkillNextLvCfgDataByID(skillID);
            if (skillNextLvCfgDataByID != null)
            {
                this.SetSkillUpgradeItem(11, skillNextLvCfgDataByID.itemNum.get_Item(0));
            }
        }
        else
        {
            this.SetSkillUpgradeBtnState(false);
            base.FindTransform("SkillUpItemInfo").get_gameObject().SetActive(false);
        }
    }
예제 #3
0
 public bool CheckSkillUpgradeCanShowRedPointTip(int skillID)
 {
     if (EntityWorld.Instance.EntSelf == null || EntityWorld.Instance.EntSelf.Lv < this.SkillCanUpLevel)
     {
         return(false);
     }
     if (this.skillTrainDic != null && this.skillTrainDic.ContainsKey(skillID))
     {
         int skillLv = this.skillTrainDic.get_Item(skillID).skillLv;
         JiNengShengJiBiao skillNextLvCfgDataByID = this.GetSkillNextLvCfgDataByID(skillID);
         if (skillNextLvCfgDataByID == null)
         {
             return(false);
         }
         long num = (long)skillNextLvCfgDataByID.itemNum.get_Item(0);
         if (EntityWorld.Instance.EntSelf.SkillPoint >= num)
         {
             return(true);
         }
     }
     return(false);
 }