public void OnClickAuthenticate() { UI_RuneMange._instance.mGuid = mRuneGUID; if (mRuneGUID == null) { return; } ItemEquip itemE = (ItemEquip)ObjectSelf.GetInstance().CommonItemContainer.FindItem(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_EQUIP, mRuneGUID); ItemTemplate itemT = itemE.GetItemRowData(); //一星符文没法鉴定; if (itemT.getRune_quality() <= 1) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("hero_rune_tip3")); return; } int count = DataTemplate.GetInstance().GetRuneMaxRedefineTimes(itemT); //是否鉴定满级; if (itemE.GetDefineTimes() >= count) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("hero_rune_tip4")); return; } UI_RuneIdentifyMgr.SetShowRuneGUID(mRuneGUID); GameEventDispatcher.Inst.dispatchEvent(GameEventID.U_OpenUI, UI_RuneIdentifyMgr.UI_ResPath); UI_CaptionManager cap = UI_CaptionManager.GetInstance(); }
void OnIdentifyBtnClick() { //HideRuneDetailUI(); ItemEquip itemE = _ObjectCard.GetHeroData().GetRuneItemInfo(mRunePoint); ItemTemplate itemT = itemE.GetItemRowData(); //一星符文没法鉴定; if (itemT.getRune_quality() <= 1) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("hero_rune_tip3"), mMsgBoxTrans); return; } //是否鉴定满级; int count = DataTemplate.GetInstance().GetRuneMaxRedefineTimes(itemT); if (itemE.GetDefineTimes() >= count) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("hero_rune_tip4"), mMsgBoxTrans); return; } //if (!initRuneIdentifyUIDone) //{ // initRuneIdentifyUIDone = true; // mRuneIdentifyMgr = new UI_RuneIdentifyMgr(mRuneIdentityObj); //} //mRuneIdentifyMgr.ShowUI(itemE.GetItemGuid()); GameEventDispatcher.Inst.dispatchEvent(GameEventID.U_OpenUI, UI_RuneIdentifyMgr.UI_ResPath); UI_RuneIdentifyMgr.SetShowRuneGUID(itemE.GetItemGuid()); RunOnBack(); }
public void UpdateShow(int runeid, ItemTemplate rune) { if (rune == null) { return; } mRuneGUID = UI_RuneMange._instance.rune[runeid].GetItemGuid(); runeName.text = GameUtils.getString(rune.getName()); //runeIcon.overrideSprite = UIResourceMgr.LoadSprite(common.defaultPath + rune.getIcon()); //runeIcon.transform.localScale = new Vector3(0.8f,0.8f,0f); //runeIcon.SetNativeSize(); mIconItem.SetIcon(common.defaultPath + rune.getIcon()); mIconItem.SetStarsNum(rune.getRune_quality()); mIconItem.SetRuneType(rune.getRune_type()); //int starCount = rune.getRune_quality(); //for (int n = 0; n < mStarList.Count; n++) //{ // if (n == starCount - 1) // { // mStarList[n].SetActive(true); // } // else // { // mStarList[n].SetActive(false); // } //} //for (int m = 1; m <= 4; m++) //{ // mTypes[m - 1].gameObject.SetActive(m == rune.getRune_type()); //} mIconItem.SetIsSpecial(RuneModule.IsSpecialRune(rune)); //GameUtils.DestroyChildsObj(mAttriList); ItemEquip data = (ItemEquip)ObjectSelf.GetInstance().CommonItemContainer.FindItem(EM_BAG_HASHTABLE_TYPE.EM_BAG_HASHTABLE_TYPE_EQUIP, mRuneGUID); //runeLevel.text = "+" + data.GetStrenghLevel(); mIconItem.SetLevel(data.GetStrenghLevel()); //装备人名字 ObjectCard oc = ObjectSelf.GetInstance().HeroContainerBag.GetItemUser(data); if (oc == null) { userName.gameObject.SetActive(false); } else { HeroTemplate heroT = DataTemplate.GetInstance().GetHeroTemplateById(oc.GetHeroData().TableID); if (heroT != null) { userName.text = GameUtils.getString(heroT.getTitleID()) + " " + GameUtils.getString("hero_rune_content7"); } userName.gameObject.SetActive(true); } //是否满级; bool isFullLv = DataTemplate.GetInstance().IsRuneStrenthFullLevel(rune, data.GetStrenghLevel()); GameUtils.SetBtnSpriteGrayState(intensifyBtn, isFullLv); showAtt.Clear(); //--------基础属性; RuneData runeData = data.GetRuneData(); bool titleDone1 = false; int split = 0; int k = 0, p = 0; foreach (int id in runeData.BaseAttributeID) { if (id == -1) { continue; } if (!titleDone1) { k++; titleDone1 = true; CreateTitle(mAttriList, GameUtils.getString("hero_rune_content8"), k - 1); } } foreach (int id in runeData.BaseAttributeID) { if (id == -1) { continue; } BaseruneattributeTemplate bt = DataTemplate.GetInstance().GetBaseruneattributeTemplate(id); p++; if (bt.getNumshow() != 0) { CreateBaseAttriObj(mAttriList, GameUtils.getString(bt.getAttriDes()), "+" + bt.getAttriValue().ToString(), p - 1); } } //创建特殊服务的特效效果属性 foreach (int id in runeData.BaseAttributeID) { if (id == -1) { continue; } BaseruneattributeTemplate bt = DataTemplate.GetInstance().GetBaseruneattributeTemplate(id); if (bt.getNumshow() == 0) { CreateDetailTxts(mAttriList, GameUtils.getString(bt.getAttriDes())); } } //--------附加属性; int count = DataTemplate.GetInstance().GetRuneMaxRedefineTimes(rune); bool titleDone2 = false; int i = 0; bool isGray = false; int b = 0; foreach (int id in runeData.AppendAttribute) { i++; isGray = i * 3 > data.GetStrenghLevel(); if (id == -1) { if (i <= count) { if (!titleDone2) { k++; titleDone2 = true; CreateTitle(mAttriList, GameUtils.getString("hero_rune_content9"), k - 1); } b++; //未知属性,未鉴定; CreateAddAttriObj(mAttriList, GameUtils.getString("rune_content2"), "", GameUtils.getString("rune_content3"), isGray, b - 1); } continue; } if (!titleDone2) { k++; titleDone2 = true; CreateTitle(mAttriList, GameUtils.getString("hero_rune_content9"), k - 1); } b++; AddruneattributeTemplate bt = DataTemplate.GetInstance().GetAddruneattributeTemplate(id); bool isPercent = bt.getIspercentage() > 0; string val = isPercent ? ((float)bt.getAttriValue() / (float)10f + "%") : bt.getAttriValue().ToString(); CreateAddAttriObj(mAttriList, GameUtils.getString(bt.getAttriDes1()), GameUtils.getString(bt.getAttriDes2()), bt.getSymbol() + val, isGray, b - 1); } for (int m = 0; m < showAtt.Count; m++) { showAtt[m].SetActive(true); } //是否鉴定满级; GameUtils.SetBtnSpriteGrayState(authenticateBtn, data.GetDefineTimes() >= count); }
void ShowRuneDetailUI(ItemEquip itemE) { if (itemE == null) { return; } ItemTemplate itemT = DataTemplate.GetInstance().GetItemTemplateById(itemE.GetItemTableID()); mSpecHeroName.text = ""; HideAllRuneSelectEffect(); mRunes[(int)mRunePoint].SetEffectShow((EM_RUNE_TYPE)(itemT.getRune_type())); // mRuneDetailItem.SetIcon(common.defaultPath + itemT.getIcon()); // mRuneDetailItem.SetStarsNum(itemT.getRune_quality()); // mRuneDetailItem.SetLevel(itemE.GetStrenghLevel()); // mRuneDetailItem.SetLevelInfoActive(true); // //bool isSpecial = itemT.getRune_type() == 5 || itemT.getRune_type() == 6; // bool isSpecial = RuneModule.IsSpecialRune(itemT); // mRuneDetailItem.SetIsSpecial(isSpecial); // if (!isSpecial) // { // mRuneDetailItem.SetRuneType(itemT.getRune_type()); // } if (mItemCommon == null) { mItemCommon = RuneFactory.CreateRuneItemCommom(m_RuneItemPos); } RuneItemCommonData ricd = new RuneItemCommonData(); ricd.IsShowMaxEffect = true; ricd.ItemT = itemE.GetItemRowData(); ricd.RuneLevel = itemE.GetStrenghLevel(); ricd.EquipedHeroName = RuneModule.GetItemEuipHeroName(itemE); mItemCommon.SetRuneItemData(ricd, RuneItemCommon.RuneItemShowType.IconWithRightName); //mRuneName.text = GameUtils.getString(itemT.getName()); mUserObj.SetActive(false); if (mDetailCommon == null) { mDetailCommon = new RuneDetailCommon(m_RuneAttriPos, itemE.GetItemGuid(), 450f); } else { mDetailCommon.SetShowData(itemE.GetItemGuid()); } // GameUtils.DestroyChildsObj(mAttriList); // //基础属性; // bool titleDone1 = false; // RuneData runeData = itemE.GetRuneData(); // foreach(int id in runeData.BaseAttributeID) // { // if(id == -1) // continue; // // if(!titleDone1) // { // titleDone1 = true; // CreateTitle(mAttriList, GameUtils.getString("hero_rune_content8")); // } // // BaseruneattributeTemplate bt = DataTemplate.GetInstance().GetBaseruneattributeTemplate(id); // if(bt.getNumshow() == 0) // { // //CreateTitle(mAttriList, GameUtils.getString(bt.getAttriDes())); // CreateDetailTxts(mAttriList, GameUtils.getString(bt.getAttriDes())); // } // else // { // //CreateBaseAttriObj(mAttriList, GameUtils.GetAttriName(bt.getAttriType()), "+" + bt.getAttriValue().ToString()); // CreateBaseAttriObj(mAttriList, GameUtils.getString(bt.getAttriDes()), "+" + bt.getAttriValue().ToString()); // } // } // // //附加属性-------激活等级分别为强化等级达到3/6/9/12; // bool titleDone2 = false; int count = DataTemplate.GetInstance().GetRuneMaxRedefineTimes(itemT); // int i = 0; // int strenthLv = itemE.GetStrenghLevel(); // bool isGray = false; // // foreach (int id in runeData.AppendAttribute) // { // i++; // isGray = i * 3 > strenthLv; // if (id == -1) // { // if (i <= count) // { // if (!titleDone2) // { // titleDone2 = true; // CreateTitle(mAttriList, GameUtils.getString("hero_rune_content9")); // } // // //位置属性,未鉴定; // CreateAddAttriObj(mAttriList, GameUtils.getString("rune_content2"), "", GameUtils.getString("rune_content3"), isGray); // } // // continue; // } // // if(!titleDone2) // { // titleDone2 = true; // CreateTitle(mAttriList, GameUtils.getString("hero_rune_content9")); // } // // AddruneattributeTemplate bt = DataTemplate.GetInstance().GetAddruneattributeTemplate(id); // bool isPercent = bt.getIspercentage() > 0; // string val = isPercent ? ((float)bt.getAttriValue() / (float)10f + "%") : bt.getAttriValue().ToString(); // CreateAddAttriObj(mAttriList, GameUtils.getString(bt.getAttriDes1()), GameUtils.getString(bt.getAttriDes2()), bt.getSymbol() + val, isGray); // } //设置按钮状态; GameUtils.SetBtnSpriteGrayState(mStrenthBtn, DataTemplate.GetInstance().IsRuneStrenthFullLevel(itemT, itemE.GetStrenghLevel())); GameUtils.SetBtnSpriteGrayState(mIdentifyBtn, itemE.GetDefineTimes() >= count); mRuneDetailObj.SetActive(true); }