public void RefreshSoulStone(HeroData hd) { this.hd = hd; soulItem = playerData.GetInstance().GetItemDatatByID(hd.node.soul_gem); if (null == soulItem) { currentSoul = 0; } else { currentSoul = soulItem.Count; } SoulStoneIcon.GetComponent <UIButton>().normalSprite = Globe.selectHero.icon_name; if (hd.star < 5) { int star = hd.star; //RisingStarBtn.gameObject.SetActive(true); //Gold.gameObject.SetActive(true); starUpHero = FSDataNodeTable <StarUpGradeNode> .GetSingleton().FindDataByType(++star); //更换英雄魂石图标 Gold 魂石条 //Gold.text = "" + starUpHero.evolve_cost; //魂石条赋值 SoulStoneBar.value = currentSoul / (float)starUpHero.call_stone_num; SoulStoneBar.transform.Find("Label").GetComponent <UILabel>().text = currentSoul + "/" + starUpHero.call_stone_num; } else { SoulStoneBar.value = 1 / 1; SoulStoneBar.transform.Find("Label").GetComponent <UILabel>().text = currentSoul + ""; //RisingStarBtn.gameObject.SetActive(false); //Gold.gameObject.SetActive(false); } //if (playerData.GetInstance().selfData.expPool > 0) //{ // Exp.gameObject.SetActive(true); //} //else //{ // Exp.gameObject.SetActive(false); //} Explbl.text = playerData.GetInstance().selfData.expPool.ToString(); Upgradenumlab.text = "提升" + HeroAndEquipNodeData.Instance().GetHeroLV(hd, playerData.GetInstance().selfData.expPool).ToString() + "级"; }
void ALLIntensifyBtnClick() { if (HeroAndEquipNodeData.Instance().GetUpALLEquipNum().Count > 0) { ClientSendDataMgr.GetSingle().GetHeroSend().SendUpGradeHE(UI_HeroDetail.hd.id, HeroAndEquipNodeData.Instance().GetUpALLEquipNum(), HeroAndEquipNodeData.Instance().GetMoney(), C2SMessageType.Active); } else { if (HeroAndEquipNodeData.LvState == false) { Control.ShowGUI(UIPanleID.UITooltips, EnumOpenUIType.DefaultUIOrSecond, false, "请提升英雄等级"); } else { Control.ShowGUI(UIPanleID.UIGoldHand, EnumOpenUIType.DefaultUIOrSecond); } } }
//合成 private void SetCompoundData(MaterialItsm MIs, long id) { propid = id; MIs.INS = GameLibrary.Instance().ItemStateList[id]; if (MIs.INS != null) { CompoundName.spriteName = MIs.INS.icon_name; CompoundIcon.spriteName = UISign_in.GetspriteName(MIs.INS.grade); ItemNodeState ins; switch (GetSyn_conditionLength(GameLibrary.Instance().ItemStateList[id].syn_condition.Length)) { case 1: ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[id].syn_condition[0, 0].ToString())]; // HeroAndEquipNodeData.Locations = 0; MI2[0].RefreshUI(ins, 0); material0.gameObject.SetActive(true); material1.gameObject.SetActive(false); material2.gameObject.SetActive(false); material3.gameObject.SetActive(false); break; case 2: ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[id].syn_condition[0, 0].ToString())]; MI2[1].RefreshUI(ins, 0); // HeroAndEquipNodeData.Locations = 0; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[id].syn_condition[1, 0].ToString())]; MI2[2].RefreshUI(ins, 1); // HeroAndEquipNodeData.Locations = 1; material0.gameObject.SetActive(false); material1.gameObject.SetActive(true); material2.gameObject.SetActive(false); material3.gameObject.SetActive(false); // HeroAndEquipNodeData.Locations = 0; break; case 3: ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[0, 0].ToString())]; MI2[3].RefreshUI(ins, 0); // HeroAndEquipNodeData.Locations = 0; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[1, 0].ToString())]; MI2[4].RefreshUI(ins, 1); // HeroAndEquipNodeData.Locations = 1; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[2, 0].ToString())]; MI2[5].RefreshUI(ins, 2); // HeroAndEquipNodeData.Locations = 2; material0.gameObject.SetActive(false); material1.gameObject.SetActive(false); material2.gameObject.SetActive(false); material3.gameObject.SetActive(false); // HeroAndEquipNodeData.Locations = 0; break; case 4: ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[0, 0].ToString())]; MI2[6].RefreshUI(ins, 0); // HeroAndEquipNodeData.Locations = 0; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[1, 0].ToString())]; MI2[7].RefreshUI(ins, 1); //HeroAndEquipNodeData.Locations = 1; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[2, 0].ToString())]; MI2[8].RefreshUI(ins, 2); // HeroAndEquipNodeData.Locations = 2; ins = GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNum(GameLibrary.Instance().ItemStateList[MIs.INS.props_id].syn_condition[3, 0].ToString())]; MI2[9].RefreshUI(ins, 3); //HeroAndEquipNodeData.Locations = 3; material0.gameObject.SetActive(false); material1.gameObject.SetActive(false); material2.gameObject.SetActive(false); material3.gameObject.SetActive(true); // HeroAndEquipNodeData.Locations = 0; break; default: break; } HeroAndEquipNodeData.MI.Add(MIs); } }
private void SetIntensifyData(ItemEquip IE, int site) { if (EquipEvolve != null) { EquipEvolve.gameObject.SetActive(false); } if (EquipIntensify != null) { EquipIntensify.gameObject.SetActive(true); } if (EquipIntensifyImg != null && IE != null && IE.itemVO != null) { EquipIntensifyImg.spriteName = IE.itemVO.icon_name; } if (Intensifyicon != null) { Intensifyicon.spriteName = UISign_in.GetspriteName(IE.itemVO.grade); } if (IntensifyName != null && IE != null && IE.itemVO != null) { IntensifyName.text = IE.itemVO.name; } HeroData hd = playerData.GetInstance().GetHeroDataByID(Globe.selectHero.hero_id); EquipData ed; hd.equipSite.TryGetValue(site, out ed); if (ed != null) { lvFront.text = ed.level + "级"; LvQueen.text = ed.level + 1 + "级"; } long ALLEquipMoney = 0; for (int i = 0; i < EquipPanel.instance.ItemEquiplist.Length; i++) { if (EquipPanel.instance.ItemEquiplist[i] != null) { hd.equipSite.TryGetValue(i + 1, out ed); foreach (var item in FSDataNodeTable <EquipUpgradeNode> .GetSingleton().DataNodeList.Values) { if (ed != null) { if (ed.level == item.id) { ALLEquipMoney += item.consume; } } } } } ONE.text = ALLEquipMoney.ToString(); HeroAndEquipNodeData.Instance().GetUpOneEquipNum(sites); TEN.text = HeroAndEquipNodeData.Money.ToString(); IntensifyLV.text = "一键强化到" + HeroAndEquipNodeData.lv.ToString() + "级"; //TEN.text= //item if (UI_HeroDetail.BtnState == false) { // EquipIntensifyList.Instance().refreshUI(IE); } equlistMultList.InSize(18, 1); equlistMultList.Info(EquipPanel.instance.ItemEquiplist); }
protected override void ShowHandler() { if (INS == null) { long equpid = playerData.GetInstance().selectHeroDetail.equipSite[EquipDevelop.GetSingolton().index + 1].id; INS = GameLibrary.Instance().ItemStateList[equpid]; } MaterialName.spriteName = INS.icon_name; MaterialIcon.spriteName = UISign_in.GetspriteName(INS.grade); if (int.Parse(INS.props_id.ToString().Substring(0, 3)) == 103) { debris.gameObject.SetActive(true); } else { debris.gameObject.SetActive(false); } if (int.Parse(INS.props_id.ToString().Substring(0, 3)) == 102) { HeroData hd = playerData.GetInstance().GetHeroDataByID(Globe.selectHero.hero_id); EquipData ed; hd.equipSite.TryGetValue(HeroAndEquipNodeData.site, out ed); ItemNodeState ins = GameLibrary.Instance().ItemStateList[ed.id + 1]; Debug.Log(localpos + " ===>" + ed.id); if (ins != null) { if (localpos < ins.syn_condition.Length / 2) { MaterialNum.text = playerData.GetInstance().GetItemCountById(ins.syn_condition[localpos, 0]) + "/" + ins.syn_condition[localpos, 1].ToString(); } else { Debug.Log(localpos + " ===>" + ed.id); } } } else { Debug.Log(INS.props_id); MaterialNum.text = playerData.GetInstance().GetItemCountById(GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNums(INS.props_id.ToString())].syn_condition[localpos, 0]) + "/" + GameLibrary.Instance().ItemStateList[HeroAndEquipNodeData.Instance().GetReplaceNums(INS.props_id.ToString())].syn_condition[localpos, 1].ToString(); } }
public void refreshUI(ItemEquip IE) { IEs = IE; FrontEquipPropertylist = HeroAndEquipNodeData.Instance().GetFrontEquipPropertyNum(IE); QueenEquipPropertyList = HeroAndEquipNodeData.Instance().GetQueenEquipPropertyNum(IE); }