/// <summary> /// Init the specified jewel and SkillLevel. /// </summary> /// <param name="jewel">Jewel.</param> /// <param name="SkillLevel">Skill level.</param> public void Init(ItemFielInfo itemFielInfo, bool isSuit) { ItemId = itemFielInfo.LocalItemData._goodID; jewel = ItemDataManager.Instance.GetItemData(ItemId) as Jewel; if (isSuit) { Title.SetText("套装属性"); skillId = jewel._activePassiveSkill.skillID; skillLevel = jewel._activePassiveSkill.skillLevel; } else { Title.SetText("器魂属性"); skillId = jewel.PassiveSkill; if (itemFielInfo.sSyncContainerGoods_SC.uidGoods != 0) { skillLevel = itemFielInfo.materiel.ESTORE_FIELD_LEVEL; } else { EquiptSlotType type = (EquiptSlotType)JewelBesetManager.GetInstance().Sc_Container.SelectItemFileInfo.sSyncContainerGoods_SC.nPlace; List <JewelInfo> jewelInfos = PlayerDataManager.Instance.GetJewelInfo(type); foreach (var item in jewelInfos) { if (item.JewelID == jewel._goodID) { skillLevel = item.JewelLevel; } } } } SkillLevel.SetText(string.Format(LanguageTextManager.GetString("IDS_I9_29"), skillLevel)); if (skillLevel == 0) { skillLevel++; } passiveSkillData = _PassiveSkillDataBase._dataTable.First(c => (c.SkillID == skillId && c.SkillLevel == skillLevel)); SkillName.SetText(LanguageTextManager.GetString(passiveSkillData.SkillName)); AttributeContent.Init(passiveSkillData); }
// public IEnumerator ShowSwallow2() // { // SwallowEff2.SetActive(true); // yield return new WaitForSeconds(1); // SwallowEff2.SetActive(false); // } public void Init(ItemFielInfo itemFileInfo) { if (itemFileInfo != null) { HideOrShow(true); Jewel jewel = ItemDataManager.Instance.GetItemData(itemFileInfo.LocalItemData._goodID) as Jewel; JewelName.SetText(NGUIColor.SetTxtColor(LanguageTextManager.GetString(itemFileInfo.LocalItemData._szGoodsName), (TextColor)itemFileInfo.LocalItemData._ColorLevel)); JewelPosition.SetText(ItemInfoTips_Jewel.getJewelPosion(jewel.StonePosition, "、")); JewelLevel.SetText(itemFileInfo.materiel.ESTORE_FIELD_LEVEL); IconPoint.ClearChild(); CreatObjectToNGUI.InstantiateObj(jewel._picPrefab, IconPoint); if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel) { Progress_text.gameObject.SetActive(true); FullLevel.SetActive(false); Progress_text.SetText(itemFileInfo.materiel.ESTORE_FIELD_EXP + "/" + jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1]); Progress_slider.sliderValue = (float)itemFileInfo.materiel.ESTORE_FIELD_EXP / (float)jewel.StoneExp[itemFileInfo.materiel.ESTORE_FIELD_LEVEL - 1]; } else { Progress_text.gameObject.SetActive(false); Progress_slider.sliderValue = 1; FullLevel.SetActive(true); } //服务器bug器魂初始等级为0为了调试这里+1 currentskill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == itemFileInfo.materiel.ESTORE_FIELD_LEVEL); CurrentAtt.Init(currentskill); if (itemFileInfo.materiel.ESTORE_FIELD_LEVEL < jewel.MaxLevel) { NextrAtt.gameObject.SetActive(true); nextSkill = JewelBesetManager.GetInstance().passiveSkillDataBase._dataTable.First(c => c.SkillID == jewel.PassiveSkill && c.SkillLevel == (itemFileInfo.materiel.ESTORE_FIELD_LEVEL + 1)); NextrAtt.Init(nextSkill); NoneAtt.gameObject.SetActive(false); } else { NextrAtt.gameObject.SetActive(false); NoneAtt.gameObject.SetActive(true); } } else { HideOrShow(false); } }