protected override void OnQuery_SELECT_ITEM() { if (localInventoryEquipData == null || localInventoryEquipData.Length == 0) { GameSection.StopEvent(); } else { SmithManager.SmithGrowData smithData = MonoBehaviourSingleton<SmithManager>.I.GetSmithData<SmithManager.SmithGrowData>(); if (smithData == null) { GameSection.StopEvent(); } else { EquipItemInfo selectEquipData = smithData.selectEquipData; if (selectEquipData.IsLevelMax()) { if (selectEquipData.tableData.IsEvolve()) { GameSection.ChangeEvent("EVOLVE", null); } else if (selectEquipData.IsExceedMax() && !selectEquipData.tableData.IsShadow()) { GameSection.ChangeEvent("ALREADY_LV_MAX", null); } } } } }
public ItemIconDetail.ICON_STATUS GetIconStatus() { bool flag = IsLvMaxAndEnableEvolve(); bool flag2 = IsEnoughMaterial(); if (equipData.IsLevelMax() && !equipData.tableData.IsEvolve() && equipData.IsExceedMax()) { return(ItemIconDetail.ICON_STATUS.GROW_MAX); } if (!flag2) { return(ItemIconDetail.ICON_STATUS.NOT_ENOUGH_MATERIAL); } if (flag) { return(ItemIconDetail.ICON_STATUS.VALID_EVOLVE); } return(ItemIconDetail.ICON_STATUS.NONE); }
private void EquipParam(EquipItemInfo item) { EquipItemTable.EquipItemData equipItemData = item?.tableData; if (item != null && equipItemData != null) { bool flag = item.tableData.IsVisual(); SetLabelText(detailBase, UI.LBL_NAME, equipItemData.name); SetActive(detailBase, UI.STR_LV, !flag); SetActive(detailBase, UI.STR_ONLY_VISUAL, flag); SetLabelText(detailBase, UI.LBL_LV_NOW, item.level.ToString()); SetLabelText(detailBase, UI.LBL_LV_MAX, equipItemData.maxLv.ToString()); SetLabelText(detailBase, UI.LBL_ATK, item.atk.ToString()); SetLabelText(detailBase, UI.LBL_ELEM, item.elemAtk.ToString()); SetElementSprite(detailBase, UI.SPR_ELEM, item.GetElemAtkType()); SetLabelText(detailBase, UI.LBL_DEF, item.def.ToString()); int num = item.elemDef; if (equipItemData.isFormer) { num = Mathf.FloorToInt((float)num * 0.1f); } SetLabelText(detailBase, UI.LBL_ELEM_DEF, num.ToString()); SetDefElementSprite(detailBase, UI.SPR_ELEM_DEF, item.GetElemDefType()); SetLabelText(detailBase, UI.LBL_HP, item.hp.ToString()); SetLabelText(detailBase, UI.LBL_SELL, item.sellPrice.ToString()); SetActive(detailBase, UI.OBJ_FAVORITE_ROOT, (callSection & (CURRENT_SECTION.QUEST_RESULT | CURRENT_SECTION.EQUIP_LIST)) == CURRENT_SECTION.NONE); SetActive(detailBase, UI.SPR_IS_EVOLVE, item.tableData.IsEvolve()); SetEquipmentTypeIcon(detailBase, UI.SPR_TYPE_ICON, UI.SPR_TYPE_ICON_BG, UI.SPR_TYPE_ICON_RARITY, item.tableData); SetRenderEquipModel((Enum)UI.TEX_MODEL, equipItemData.id, sex, faceID, 1f); ResetTween(detailBase, UI.TWN_FAVORITE, 0); ResetTween(detailBase, UI.TWN_UNFAVORITE, 0); SetActive(detailBase, UI.TWN_UNFAVORITE, !item.isFavorite); SetActive(detailBase, UI.TWN_FAVORITE, item.isFavorite); bool flag2 = !item.IsLevelMax() || !item.IsExceedMax() || item.tableData.IsEvolve() || item.tableData.IsShadow(); SetActive((Enum)UI.BTN_GROW, flag2 && CanSmithSection(callSection)); SetActive((Enum)UI.BTN_GROW_OFF, !flag2 && CanSmithSection(callSection)); } else { NotDataEquipParam(); } }
private void SetupBottomButton() { switch (smithType) { case SmithType.EVOLVE: { SetActive((Enum)UI.BTN_NEXT, false); SetActive((Enum)UI.BTN_NEXT_GRAY, false); SetActive((Enum)UI.BTN_TO_SELECT, false); SetActive((Enum)UI.BTN_TO_SELECT_CENTER, true); EquipItemInfo equipItemInfo = resultData.itemData as EquipItemInfo; if (equipItemInfo != null && (!equipItemInfo.IsLevelMax() || !equipItemInfo.IsExceedMax() || equipItemInfo.tableData.IsShadow())) { SetActive((Enum)UI.BTN_NEXT, true); SetEvent((Enum)UI.BTN_NEXT, "NEXT_GROW_AUTO", 0); SetActive((Enum)UI.BTN_TO_SELECT, true); SetActive((Enum)UI.BTN_TO_SELECT_CENTER, false); SetLabelText((Enum)UI.LBL_NEXT_BTN, base.sectionData.GetText("CONTINUE")); } break; } case SmithType.GENERATE: SetActive((Enum)UI.BTN_NEXT_GRAY, false); SetActive((Enum)UI.BTN_TO_SELECT, true); SetActive((Enum)UI.BTN_TO_SELECT_CENTER, false); SetLabelText((Enum)UI.LBL_NEXT_BTN, base.sectionData.GetText("CONTINUE")); break; case SmithType.GROW: { SetActive((Enum)UI.BTN_NEXT_GRAY, false); SetActive((Enum)UI.BTN_TO_SELECT, true); SetActive((Enum)UI.BTN_TO_SELECT_CENTER, false); bool flag = false; EquipItemInfo equipItemInfo2 = resultData.itemData as EquipItemInfo; if (equipItemInfo2 != null && equipItemInfo2.IsLevelMax()) { if (equipItemInfo2.tableData.IsEvolve()) { SetActive((Enum)UI.BTN_NEXT, true); SetActive((Enum)UI.BTN_NEXT_GRAY, false); SetEvent((Enum)UI.BTN_NEXT, "NEXT_EVOLVE_AUTO", 0); flag = true; } else if (!equipItemInfo2.IsExceedMax() || equipItemInfo2.tableData.IsShadow()) { SetActive((Enum)UI.BTN_NEXT, true); SetActive((Enum)UI.BTN_NEXT_GRAY, false); } else { SetActive((Enum)UI.BTN_NEXT, false); SetActive((Enum)UI.BTN_NEXT_GRAY, true); } } if (flag) { SetLabelText((Enum)UI.LBL_NEXT_BTN, base.sectionData.GetText("NEXT_EVOLVE")); SetLabelText((Enum)UI.LBL_NEXT_GRAY_BTN, base.sectionData.GetText("NEXT_EVOLVE")); } else { SetLabelText((Enum)UI.LBL_NEXT_BTN, base.sectionData.GetText("CONTINUE")); SetLabelText((Enum)UI.LBL_NEXT_GRAY_BTN, base.sectionData.GetText("CONTINUE")); } break; } case SmithType.SKILL_GROW: { SetActive((Enum)UI.BTN_NEXT_GRAY, false); SetActive((Enum)UI.BTN_TO_SELECT, true); SetActive((Enum)UI.BTN_TO_SELECT_CENTER, false); SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo; if (skillItemInfo != null && skillItemInfo.IsLevelMax()) { SetActive((Enum)UI.BTN_NEXT, false); SetActive((Enum)UI.BTN_NEXT_GRAY, true); } SetLabelText((Enum)UI.LBL_NEXT_BTN, base.sectionData.GetText("CONTINUE")); SetLabelText((Enum)UI.LBL_NEXT_GRAY_BTN, base.sectionData.GetText("CONTINUE")); break; } } SetLabelText((Enum)UI.LBL_NEXT_BTN_R, base.GetComponent <UILabel>((Enum)UI.LBL_NEXT_BTN).text); SetLabelText((Enum)UI.LBL_NEXT_GRAY_BTN_R, base.GetComponent <UILabel>((Enum)UI.LBL_NEXT_GRAY_BTN).text); SetLabelText((Enum)UI.LBL_TO_SELECT_CENTER_R, base.GetComponent <UILabel>((Enum)UI.LBL_TO_SELECT_CENTER).text); }