public void SendEmbedRunedStoneReq(int skillID, int runeStoneID) { Runes_basic runesBasicCfgData = this.GetRunesBasicCfgData(runeStoneID); if (runesBasicCfgData != null) { int runesGroup = runesBasicCfgData.runesGroup; if (this.skillRuneInfoDic != null && this.skillRuneInfoDic.ContainsKey(skillID) && this.skillRuneInfoDic.get_Item(skillID).embedGroupId == runesGroup) { return; } Debug.Log(string.Concat(new object[] { "请求符文组镶嵌,技能ID为:", skillID, "符文组为:", runesGroup })); NetworkManager.Send(new RunedStoneEmbedReq { skillId = skillID, groupId = runesGroup }, ServerType.Data); } }
private void RefreshSelectRuneStoneDesc(int runeID) { this.runeStoneNameText.set_text(string.Empty); this.runeStoneDescText.set_text(string.Empty); if (runeID <= 0) { return; } Runes runesCfgData = SkillRuneManager.Instance.GetRunesCfgData(runeID); if (runesCfgData != null) { this.runeStoneDescText.set_text(GameDataUtils.GetChineseContent(runesCfgData.desc, false)); } Runes_basic runesBasicCfgData = SkillRuneManager.Instance.GetRunesBasicCfgData(runeID); if (runesBasicCfgData != null) { this.runeStoneNameText.set_text(GameDataUtils.GetChineseContent(runesBasicCfgData.name, false)); } }
private void RefreshRuneDesc(int id, Artifact godData) { Runes runes = DataReader <Runes> .Get(id); Runes_basic runes_basic = DataReader <Runes_basic> .Get(id); if (runes_basic != null) { ResourceManager.SetSprite(this.mSkillIcon, GameDataUtils.GetIcon(runes_basic.icon)); this.mTxSkillName.set_text(GameDataUtils.GetChineseContent(runes_basic.name, false)); this.mTxSkillTitle.set_text("符文描述:"); this.mTxSkillDesc.set_text(GameDataUtils.GetChineseContent(runes.desc, false)); string text = GameDataUtils.GetChineseContent(godData.access, false); if (godData.activation == 1) { RenWuPeiZhi renWuPeiZhi = DataReader <RenWuPeiZhi> .Get(godData.activationParameter); if (renWuPeiZhi != null) { text = string.Format(text, GameDataUtils.GetChineseContent(renWuPeiZhi.dramaIntroduce, false), renWuPeiZhi.lv + "级"); } } else if (godData.activation == 2) { text = string.Format(text, godData.activationParameter); } else if (godData.activation == 4) { Artifact artifact = DataReader <Artifact> .Get(godData.activationParameter); if (artifact != null) { text = string.Format(text, GameDataUtils.GetChineseContent(artifact.name, false), godData.lv); } } this.mTxGetDesc.set_text(text); } }
public void UpdateUI(Runes_basic runeStoneData, int skillID) { if (!this.isInit) { this.InitUI(); } this.runeStoneCfgData = runeStoneData; if (this.runeStoneCfgData == null) { return; } this.IsUnLock = SkillRuneManager.Instance.CheckRuneStoneIsUnLock(this.runeStoneCfgData.id); this.lockImgObj.SetActive(!this.IsUnLock); this.unLockImgObj.SetActive(this.IsUnLock); if (this.iconImg != null) { ResourceManager.SetSprite(this.iconImg, GameDataUtils.GetIcon(runeStoneData.icon)); int skillEmbedGroupIndex = SkillRuneManager.Instance.GetSkillEmbedGroupIndex(skillID); this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); if (this.IsUnLock && skillEmbedGroupIndex != this.runeStoneCfgData.runesGroup) { this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); ImageColorMgr.SetImageColor(this.iconImg, true); } else if (this.IsUnLock && skillEmbedGroupIndex == this.runeStoneCfgData.runesGroup) { this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 1f)); ImageColorMgr.SetImageColor(this.iconImg, false); } else if (!this.IsUnLock) { ImageColorMgr.SetImageColor(this.iconImg, false); this.iconImg.set_color(new Color(this.iconImg.get_color().r, this.iconImg.get_color().b, this.iconImg.get_color().g, 0.5f)); } } this.runeStoneNameText.set_text(string.Empty); }
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); }
private void UpdateSelectRuneStoneDetail(int runeID) { if (this.currentSelectRuneStoneID <= 0) { return; } base.FindTransform("SkillBaseAttr").get_gameObject().SetActive(false); base.FindTransform("SkillRunesAttrs").get_gameObject().SetActive(true); int runeStoneLv = SkillRuneManager.Instance.GetRuneStoneLV(runeID); Runes_basic runesBasicCfgData = SkillRuneManager.Instance.GetRunesBasicCfgData(runeID); Runes runesCfgData = SkillRuneManager.Instance.GetRunesCfgData(runeID); bool flag = SkillRuneManager.Instance.CheckRuneStoneCanUpgrade(runeID); bool flag2 = SkillRuneManager.Instance.CheckRuneStoneIsUnLock(runeID); if (runesBasicCfgData != null) { this.rightItemTitleText.set_text(GameDataUtils.GetChineseContent(runesBasicCfgData.name, false)); this.runeStoneLockLVText.set_text(string.Empty); this.runeStoneLockNeedPreText.set_text(string.Empty); if (!flag2) { this.runeStoneLockLVText.set_text(string.Format("人物达到{0}级别解锁", runesBasicCfgData.unlockLv)); if (runesBasicCfgData.condition == null || runesBasicCfgData.condition.get_Count() <= 0) { this.runeStoneLockNeedPreText.set_text(string.Empty); } else { int key = runesBasicCfgData.condition.get_Item(0).key; int value = runesBasicCfgData.condition.get_Item(0).value; Runes_basic runesBasicCfgData2 = SkillRuneManager.Instance.GetRunesBasicCfgData(key); string text = string.Empty; if (runesBasicCfgData2 != null) { text = GameDataUtils.GetChineseContent(runesBasicCfgData2.name, false); } this.runeStoneLockNeedPreText.set_text(string.Format(GameDataUtils.GetChineseContent(518003, false), text, value)); } } } this.runeStoneUnLockImg.get_gameObject().SetActive(!flag2); this.runeStoneUpgradeFullImg.get_gameObject().SetActive(!flag && flag2); if (runesCfgData != null) { this.rightDownDescText.set_text(GameDataUtils.GetChineseContent(runesCfgData.desc, false)); this.rightCanUpgradeRoot.SetActive(flag); if (flag) { Items item = BackpackManager.Instance.GetItem(runesCfgData.materials.get_Item(0)); int icon = item.icon; ResourceManager.SetSprite(this.upgradeNeedMaterialImg, GameDataUtils.GetIcon(icon)); this.upgradeNeedMaterialNumText.set_text(this.GetCostContent((long)runesCfgData.materials.get_Item(1), BackpackManager.Instance.OnGetGoodCount(item.id))); int templateId = runesCfgData.protect.get_Item(0); int addRatio = 0; this.currentProtectID = templateId; long num = BackpackManager.Instance.OnGetGoodCount(templateId); Items item2 = BackpackManager.Instance.GetItem(templateId); ResourceManager.SetSprite(this.protectStoneIcon, GameDataUtils.GetIcon(item2.icon)); base.FindTransform("ProtectStoneName").GetComponent <Text>().set_text(num + "/" + 1); if (num > 0L && this.IsSelectAddProtectBtn) { addRatio = runesCfgData.protect.get_Item(1); } else { base.FindTransform("ProtectStoneName").GetComponent <Text>().set_text(string.Concat(new object[] { "<color=red>", num, "/", 1, "</color>" })); this.IsSelectAddProtectBtn = false; this.SetAddProtectBtnState(); } this.UpdateRuneStoneUpgradeSuccessRatio(runesCfgData.successRate, addRatio); } int num2 = 0; string text2 = string.Empty; for (int i = 0; i < runesCfgData.templateId.get_Count(); i++) { int key2 = runesCfgData.templateId.get_Item(i); Runes_template runes_template = DataReader <Runes_template> .Get(key2); if (runes_template != null) { for (int j = 0; j < runes_template.damageIncreaseId.get_Count(); j++) { int key3 = runes_template.damageIncreaseId.get_Item(j); damageIncrease damageIncrease = DataReader <damageIncrease> .Get(key3); if (damageIncrease != null) { num2 += damageIncrease.Value1; } } } } Runes runes2 = DataReader <Runes> .DataList.Find((Runes runes) => runes.id == runeID && runes.lv == runeStoneLv + 1); if (runes2 == null) { text2 = "MAX"; } else { int num3 = 0; for (int k = 0; k < runes2.templateId.get_Count(); k++) { int key4 = runes2.templateId.get_Item(k); Runes_template runes_template2 = DataReader <Runes_template> .Get(key4); if (runes_template2 != null) { for (int l = 0; l < runes_template2.damageIncreaseId.get_Count(); l++) { int key5 = runes_template2.damageIncreaseId.get_Item(l); damageIncrease damageIncrease2 = DataReader <damageIncrease> .Get(key5); if (damageIncrease2 != null) { num3 += damageIncrease2.Value1; } } } } text2 = (float)num3 * 0.1f + "%"; } base.FindTransform("Attr1Strengthen" + 1).get_gameObject().SetActive(true); base.FindTransform("Attr1Strengthen" + 1).FindChild("TextAttr1ValueNow").GetComponent <Text>().set_text((float)num2 * 0.1f + "%"); base.FindTransform("Attr1Strengthen" + 1).FindChild("TextAttr1ValueAfter").GetComponent <Text>().set_text(text2); for (int m = 1; m < 3; m++) { base.FindTransform("Attr1Strengthen" + (m + 1)).get_gameObject().SetActive(false); } } }