public virtual bool IsMatchLevel(QuestItemInfo item) { QuestTable.QuestTableData tableData = item.infoData.questData.tableData; if (enemyLevelMin <= tableData.GetMainEnemyLv() && tableData.GetMainEnemyLv() <= enemyLevelMax) { return(true); } return(false); }
private void SetUpEnemy(Transform t, QuestTable.QuestTableData quest) { EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)quest.GetMainEnemyID()); if (enemyData != null) { ClearStatusQuest clearStatusQuestData = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestData(quest.questID); bool flag = clearStatusQuestData != null; int icon_id = 10999; string text = "?????"; string text2 = "??"; if (flag) { icon_id = enemyData.iconId; text = enemyData.name; text2 = quest.GetMainEnemyLv().ToString(); } ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, icon_id, null, FindCtrl(t, UI.OBJ_ENEMY), ELEMENT_TYPE.MAX, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY); itemIcon.SetDepth(7); SetElementSprite(t, UI.SPR_ENM_ELEMENT, (int)enemyData.element); SetActive(t, UI.SPR_ENM_ELEMENT, flag); SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement); SetActive(t, UI.SPR_WEAK_ELEMENT, flag); bool flag2 = enemyData.weakElement == ELEMENT_TYPE.MAX; SetActive(t, UI.STR_NON_WEAK_ELEMENT, flag2 && flag); SetActive(t, UI.STR_UNKNOWN_WEAK_ELEMENT, !flag); SetLabelText(t, UI.LBL_MONSTER_NAME, text); SetLabelText(t, UI.LBL_MONSTER_LEVEL, StringTable.Format(STRING_CATEGORY.MAIN_STATUS, 1u, text2)); } }
public override bool IsMatchLevel(QuestItemInfo item) { QuestTable.QuestTableData tableData = item.infoData.questData.tableData; if (enemyLevel == tableData.GetMainEnemyLv()) { return(true); } return(false); }
private void SetDropItemIcon(SortCompareData[] dropItemList, Transform t_grid, int wave) { if (dropItemList != null) { string text = string.Format(StringTable.Get(STRING_CATEGORY.RUSH_WAVE, 10004400u), wave); SetLabelText(t_grid, UI.LBL_DROP_ITEM_WAVE, text); QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)MonoBehaviourSingleton <InGameManager> .I.GetRushQuestId(wave)); string text2 = "Lv" + questData.GetMainEnemyLv().ToString() + Singleton <EnemyTable> .I.GetEnemyName((uint)questData.GetMainEnemyID()); SetLabelText(t_grid, UI.LBL_BOSS_NAME, text2); SetGrid(t_grid, UI.GRD_DROP_ITEM, null, dropItemList.Length, true, delegate(int i, Transform o, bool is_recycle) { ItemIcon icon = null; if (i < dropItemList.Length) { icon = CreateItemIcon(dropItemList[i], o, "DROP", i); } Transform val = SetPrefab(o, "QuestResultDropIconOpener", true); QuestResultDropIconOpener.Info info2 = new QuestResultDropIconOpener.Info { IsRare = ResultUtility.IsRare(dropItemList[i]), IsBroken = ResultUtility.IsBreakReward(dropItemList[i]) }; val.GetComponent <QuestResultDropIconOpener>().Initialized(icon, info2, delegate(Transform t, QuestResultDropIconOpener.Info info, bool is_skip) { string ui_effect_name = "ef_ui_dropitem_silver_01"; if (info.IsBroken) { ui_effect_name = "ef_ui_dropitem_red_01"; } else if (info.IsRare) { ui_effect_name = "ef_ui_dropitem_gold_01"; } SetVisibleWidgetOneShotEffect(GetCtrl(UI.OBJ_SCROLL_VIEW), t, ui_effect_name); }); }); } }
public override void UpdateUI() { //IL_017c: Unknown result type (might be due to invalid IL or missing references) Desc desc = GameSection.GetEventData() as Desc; if (desc != null) { QuestTable.QuestTableData questData = desc.questData; if (questData != null) { EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID()); if (enemyData != null) { int mainEnemyLv = questData.GetMainEnemyLv(); SetLabelText((Enum)UI.LBL_NAME, enemyData.name); SetLabelText((Enum)UI.NUM_LV, mainEnemyLv.ToString()); SetElementSprite((Enum)UI.STR_ELEM, (int)enemyData.weakElement); if (enemyData.weakElement != ELEMENT_TYPE.MAX) { SetActive((Enum)UI.STR_WEAK_NONE, false); } int num = (int)(questData.limitTime / 60f); int num2 = (int)(questData.limitTime % 60f); SetLabelText((Enum)UI.NUM_TIMER, $"{num:D2}:{num2:D2}"); UI[] array = new UI[10] { UI.OBJ_DIFFICULT_STAR_1, UI.OBJ_DIFFICULT_STAR_2, UI.OBJ_DIFFICULT_STAR_3, UI.OBJ_DIFFICULT_STAR_4, UI.OBJ_DIFFICULT_STAR_5, UI.OBJ_DIFFICULT_STAR_6, UI.OBJ_DIFFICULT_STAR_7, UI.OBJ_DIFFICULT_STAR_8, UI.OBJ_DIFFICULT_STAR_9, UI.OBJ_DIFFICULT_STAR_10 }; int num3 = (int)(questData.difficulty + 1); int i = 0; for (int num4 = array.Length; i < num4; i++) { SetActive((Enum)array[i], i < num3); } PlayTween((Enum)UI.TWN_DIFFICULT_STAR, true, (EventDelegate.Callback)null, false, 0); QuestInfoData.Mission[] array2 = QuestInfoData.CreateMissionData(questData); if (array2 != null) { GetCtrl(UI.MISSION).get_gameObject().SetActive(true); UI[] array3 = new UI[3] { UI.MISSION_LABEL_01, UI.MISSION_LABEL_02, UI.MISSION_LABEL_03 }; UI[] array4 = new UI[3] { UI.MISSION_CROWN_ON_01, UI.MISSION_CROWN_ON_02, UI.MISSION_CROWN_ON_03 }; UI[] array5 = new UI[3] { UI.MISSION_CROWN_OFF_01, UI.MISSION_CROWN_OFF_02, UI.MISSION_CROWN_OFF_03 }; int num5 = Mathf.Min(array2.Length, 3); for (int j = 0; j < num5; j++) { QuestInfoData.Mission mission = array2[j]; SetActive((Enum)array4[j], CLEAR_STATUS.CLEAR == mission.state); SetActive((Enum)array5[j], CLEAR_STATUS.CLEAR != mission.state); SetLabelText((Enum)array3[j], mission.tableData.missionText); } } if (desc.reward != null) { Array.Sort(desc.reward, (QuestInfoData.Quest.Reward l, QuestInfoData.Quest.Reward r) => l.priority - r.priority); } SetFontStyle((Enum)UI.LBL_NAME, 2); SetFontStyle((Enum)UI.NUM_LV, 2); SetFontStyle((Enum)UI.LBL_LV, 2); countAnimStep = 0; timeLimit = MonoBehaviourSingleton <InGameSettingsManager> .I.happenQuestDirection.confirmUITime; prevTime = -1; isAnswer = false; Update(); UpdateAnchors(); PlayTween((Enum)UI.OBJ_FRAME, true, (EventDelegate.Callback)null, true, 0); PlayTween((Enum)UI.COUNT_ANIM_0, true, (EventDelegate.Callback)null, false, 0); } } } }
private void SetQuestData(QuestTable.QuestTableData questData, Transform t) { //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) UI[] array = new UI[10] { UI.OBJ_DIFFICULT_STAR_1, UI.OBJ_DIFFICULT_STAR_2, UI.OBJ_DIFFICULT_STAR_3, UI.OBJ_DIFFICULT_STAR_4, UI.OBJ_DIFFICULT_STAR_5, UI.OBJ_DIFFICULT_STAR_6, UI.OBJ_DIFFICULT_STAR_7, UI.OBJ_DIFFICULT_STAR_8, UI.OBJ_DIFFICULT_STAR_9, UI.OBJ_DIFFICULT_STAR_10 }; int num = (int)(questData.difficulty + 1); int i = 0; for (int num2 = array.Length; i < num2; i++) { SetActive(t, array[i], i < num); } ResetTween(t, UI.TWN_DIFFICULT_STAR, 0); PlayTween(t, UI.TWN_DIFFICULT_STAR, true, null, false, 0); EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID()); if (enemyData != null) { SetActive(t, UI.OBJ_ENEMY, true); int iconId = enemyData.iconId; RARITY_TYPE?rarity = (questData.questType != QUEST_TYPE.ORDER) ? null : new RARITY_TYPE?(questData.rarity); ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, iconId, rarity, FindCtrl(t, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY); itemIcon.SetEnableCollider(false); SetActive(t, UI.SPR_ELEMENT_ROOT, enemyData.element != ELEMENT_TYPE.MAX); SetElementSprite(t, UI.SPR_ELEMENT, (int)enemyData.element); SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement); SetActive(t, UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX); } else { SetActive(t, UI.OBJ_ENEMY, false); SetElementSprite(t, UI.SPR_WEAK_ELEMENT, 6); SetActive(t, UI.STR_NON_WEAK_ELEMENT, true); } Transform val = FindCtrl(t, UI.SPR_ICON_DOUBLE); Transform val2 = FindCtrl(t, UI.SPR_ICON_DEFENSE_BATTLE); Transform val3 = FindCtrl(t, UI.LBL_RECRUTING_MEMBERS); Transform val4 = FindCtrl(t, UI.SPR_WINDOW_BASE); if (val4 != null) { UISprite component = val4.GetComponent <UISprite>(); Transform val5 = FindCtrl(t, UI.OBJ_SEARCH_INFO_ROOT); UISprite component2 = val5.GetComponent <UISprite>(); if (questData.questType == QUEST_TYPE.GATE || questData.questType == QUEST_TYPE.DEFENSE) { component.spriteName = "QuestListPlateO"; component2.spriteName = "SearchAdWindowO"; val.get_gameObject().SetActive(true); val2.get_gameObject().SetActive(questData.questType == QUEST_TYPE.DEFENSE); val3.get_gameObject().SetActive(questData.questType == QUEST_TYPE.DEFENSE); string format = StringTable.Get(STRING_CATEGORY.GATE_QUEST_NAME, 0u); string text = string.Empty; if (enemyData != null) { text = string.Format(format, questData.GetMainEnemyLv(), enemyData.name); } SetLabelText(t, UI.LBL_QUEST_NAME, text); SetLabelText(t, UI.LBL_QUEST_NUM, string.Empty); } else { component.spriteName = "QuestListPlateN"; component2.spriteName = "SearchAdWindow"; val.get_gameObject().SetActive(false); val2.get_gameObject().SetActive(false); val3.get_gameObject().SetActive(false); SetLabelText(t, UI.LBL_QUEST_NAME, questData.questText); SetLabelText(t, UI.LBL_QUEST_NUM, string.Format(base.sectionData.GetText("QUEST_NUMBER"), questData.locationNumber, questData.questNumber)); } } else { SetLabelText(t, UI.LBL_QUEST_NAME, questData.questText); SetLabelText(t, UI.LBL_QUEST_NUM, string.Format(base.sectionData.GetText("QUEST_NUMBER"), questData.locationNumber, questData.questNumber)); } }