private void ShowStrengthenView() { XEquip equip = GTDataManager.Instance.GetEquipDataByPos(mPosType, mPos); if (equip == null) { return; } if (EquipModule.Instance.IsFullStrengthenLevel(equip) == true) { return; } int itemID = equip.Id; GTItemHelper.ShowItemTexture(mEquipStrengthen.equipTexture, itemID); GTItemHelper.ShowItemQuality(mEquipStrengthen.equipQuality, itemID); GTItemHelper.ShowItemName(mEquipStrengthen.equipName, itemID); int costEquipNum = mStrengthenCostItems.Count; for (int i = 0; i < mEquipStrengthen.mStrengthenItems.Count; i++) { ItemStrengthen cell = mEquipStrengthen.mStrengthenItems[i]; if (i < costEquipNum) { XItem mat = mStrengthenCostItems[i]; cell.Show(true); int id = mStrengthenCostItems[i].Id; GTItemHelper.ShowItemTexture(cell.itemTexture, id); GTItemHelper.ShowItemQuality(cell.itemQuality, id); GTItemHelper.ShowItemNum(cell.itemNum, mat.Num); } else { cell.Show(false); } } DEquip equipDB = ReadCfgEquip.GetDataById(itemID); DEquipStrengLevel levelDB = ReadCfgEquipStrengLevel.GetDataById(equipDB.Quality * 1000 + equip.StrengthenLevel + 1); int addExpNum = EquipModule.Instance.GetStrengthenExpByMatList(mStrengthenCostItems); GTItemHelper.ShowItemTexture(mEquipStrengthen.costMoneyTexture, DEquip.EQUIP_STRENGTHEN_MONEY_ID_1); mEquipStrengthen.costMoneyNum.text = addExpNum.ToString(); mEquipStrengthen.equipStrengthLevel.text = GTTools.Format("强化等级 {0}", equip.StrengthenLevel); GTItemHelper.ShowProgressText(mEquipStrengthen.equipStrengthExp, equip.StrengthenExp, levelDB.RequireExp); GTItemHelper.ShowProgressSlider(mEquipStrengthen.equipStrengthExpBar, equip.StrengthenExp, levelDB.RequireExp); Dictionary <EAttr, int> propertys = AttrHelper.GetPropertys(equip); GTItemHelper.ShowEquipStrengthText(mEquipStrengthen.strengthText, itemID, equip.StrengthenLevel); GTItemHelper.ShowPropertyText(mEquipStrengthen.propertyText, propertys, true); }
private void ShowView() { labMoneyNum1.text = GTDataManager.Instance.GetItemCountById(1).ToString(); labMoneyNum2.text = GTDataManager.Instance.GetItemCountById(2).ToString(); GTItemHelper.ShowItemTexture(moneyTexture1, 1); GTItemHelper.ShowItemTexture(moneyTexture2, 2); XGem gem = GTDataManager.Instance.GetGemDataByPos(mPosType, mPos); int itemID = gem.Id; GTItemHelper.ShowItemTexture(gemTexture, itemID); GTItemHelper.ShowItemQuality(gemQuality, itemID); GTItemHelper.ShowItemName(gemName, itemID); int costgemNum = mStrengthenMats.Count; for (int i = 0; i < mStrengthenItems.Count; i++) { ItemStrengthen cell = mStrengthenItems[i]; if (i < costgemNum) { XItem mat = mStrengthenMats[i]; cell.Show(true); int id = mStrengthenMats[i].Id; GTItemHelper.ShowItemTexture(cell.itemTexture, id); GTItemHelper.ShowItemQuality(cell.itemQuality, id); GTItemHelper.ShowItemNum(cell.itemNum, mat.Num); } else { cell.Show(false); } } if (GemModule.Instance.IsFullStrengthenLevel(gem) == true) { return; } DGem gemDB = ReadCfgGem.GetDataById(itemID); DGemLevel levelDB = ReadCfgGemLevel.GetDataById(gemDB.Quality * 1000 + gem.StrengthenLevel + 1); int addExpNum = GemModule.Instance.GetExpByStrengthMatList(mStrengthenMats); GTItemHelper.ShowItemTexture(costMoneyTexture, levelDB.CostMoneyId); costMoneyNum.text = addExpNum.ToString(); gemLevel.text = GTTools.Format("强化等级 {0}", gem.StrengthenLevel); GTItemHelper.ShowProgressText(gemExpNum, gem.StrengthenExp, levelDB.RequireExp); GTItemHelper.ShowProgressSlider(gemExpBar, gem.StrengthenExp, levelDB.RequireExp); GTItemHelper.ShowGemPropertyText(gemProperty, itemID, gem.StrengthenLevel, true); gemSuit.text = GemModule.Instance.GetGemSuitName(itemID); gemType.text = GemModule.Instance.GetGemTypeName(itemID); }