private int Compare(SortCompareData lp, SortCompareData rp) { QuestSortData questSortData = lp as QuestSortData; QuestSortData questSortData2 = rp as QuestSortData; if (questSortData == null || questSortData2 == null) { return(0); } float num = questSortData.itemData.remainTimes.Min(); float num2 = questSortData2.itemData.remainTimes.Min(); bool flag = num < SHOW_QUEST_REMAIN_LIMIT_SECOND; bool flag2 = num2 < SHOW_QUEST_REMAIN_LIMIT_SECOND; if (lp.IsAbsFirst() != rp.IsAbsFirst()) { return((!lp.IsAbsFirst()) ? 1 : (-1)); } if (flag != flag2) { return((!flag) ? 1 : (-1)); } int num3 = questSortData2.GetRarity() - questSortData.GetRarity(); if (num3 == 0) { return((int)(questSortData2.GetUniqID() - questSortData.GetUniqID())); } return(num3); }
public override void Initialize() { object[] array = GameSection.GetEventData() as object[]; itemData = (array[0] as QuestSortData); sellNum = (int)array[1]; base.Initialize(); }
private void OnQuery_QUEST_DETAIL() { int num = (int)GameSection.GetEventData(); int count = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count; if (num < 0 || num >= count) { GameSection.StopEvent(); } else { QuestItemInfo questItem = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem((uint)MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[num].itemId); if (questItem == null) { GameSection.StopEvent(); } else { QuestSortData questSortData = new QuestSortData(); questSortData.SetItem(questItem); GameSection.SetEventData(questSortData); } } }
public override void OnNotify(NOTIFY_FLAG flags) { if ((flags & NOTIFY_FLAG.UPDATE_QUEST_ITEM_INVENTORY) != (NOTIFY_FLAG)0L) { QuestItemInfo questItem = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem(data.GetTableID()); if (questItem != null && questItem.infoData != null && questItem.infoData.questData.num > 0) { data = new QuestSortData(); data.SetItem(questItem); } } base.OnNotify(flags); }
public override void UpdateUI() { QuestSortData questSortData = data as QuestSortData; if (questSortData != null) { QuestItemInfo questItem = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem(data.GetTableID()); if (questItem != null) { base.UpdateUI(); SetActive((Enum)UI.OBJ_MONEY_ROOT, false); } } }
public static int SetDropData(List <SortCompareData> drop_ary, int start_ary_index, List <QuestCompleteReward.QuestItem> drop_data, REWARD_CATEGORY category = REWARD_CATEGORY.DROP) { int num = start_ary_index; QuestCompleteReward.QuestItem[] ary = drop_data.ToArray(); int i = 0; for (int num2 = ary.Length; i < num2; i++) { SortCompareData sortCompareData = null; if (num > 0 && category != REWARD_CATEGORY.BREAK) { sortCompareData = drop_ary.Find((SortCompareData _data) => _data != null && _data.GetTableID() == (uint)ary[i].questId && _data is QuestSortData); } if (sortCompareData == null) { QuestItemInfo item = new QuestItemInfo(); item.tableID = (uint)ary[i].questId; QuestData quest_list = new QuestData(); item.infoData = new QuestInfoData(Singleton <QuestTable> .I.GetQuestData(item.tableID), quest_list, null); item.infoData.questData.num = ary[i].num; if (MonoBehaviourSingleton <InventoryManager> .I.IsHaveingItem(item.tableID)) { MonoBehaviourSingleton <InventoryManager> .I.ForAllItemInventory(delegate(ItemInfo inventory_item) { if (inventory_item.tableID == item.tableID && inventory_item.num == item.infoData.questData.num) { item.uniqueID = inventory_item.uniqueID; } }); } QuestSortData questSortData = new QuestSortData(); questSortData.SetItem(item); questSortData.SetCategory(category); drop_ary.Add(questSortData); num++; } else { QuestSortData questSortData2 = sortCompareData as QuestSortData; questSortData2.itemData.infoData.questData.num += ary[i].num; } } return(num); }
public override void Initialize() { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) data = (GameSection.GetEventData() as QuestSortData); QuestItemInfo questItemInfo = data.GetItemData() as QuestItemInfo; GameSaveData.instance.RemoveNewIconAndSave(ITEM_ICON_TYPE.QUEST_ITEM, data.GetUniqID()); GameSection.SetEventData(questItemInfo.infoData); isGachaResult = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName().Contains("Gacha"); if (isGachaResult) { backupAmbientLight = RenderSettings.get_ambientLight(); RenderSettings.set_ambientLight(Utility.MakeColorByInt(201, 210, 226, 255)); } base.Initialize(); }
public override void Set(object[] data = null) { base.Set(null); QuestSortData questSortData = data[0] as QuestSortData; bool flag = (bool)data[1]; QuestTable.QuestTableData tableData = questSortData.itemData.infoData.questData.tableData; SetName(tableData.questText); SetVisibleBG(true); if (flag) { infoRootAry[0].SetActive(true); infoRootAry[1].SetActive(false); lblNum.text = questSortData.GetNum().ToString(); } else { infoRootAry[0].SetActive(false); infoRootAry[1].SetActive(true); lblDifficulty.text = ((int)(tableData.difficulty + 1)).ToString(); lblEnemyName.text = Singleton <EnemyTable> .I.GetEnemyData((uint)tableData.GetMainEnemyID()).name; } }
private void UpdateGirdListItemQuest(int i, Transform t, bool is_recycle) { //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) List <GameSectionHistory.HistoryData> historyList = MonoBehaviourSingleton <GameSceneManager> .I.GetHistoryList(); bool flag = historyList.Any((GameSectionHistory.HistoryData h) => h.sectionName.StartsWith("GuildRequest")); SetActive(t, true); SetEvent(t, "SELECT_ORDER", i); QuestSortData questSortData = questGridDatas[i].questSortData; UIScrollView component = GetCtrl(UI.SCR_ORDER_QUEST).GetComponent <UIScrollView>(); QuestInfoData info = questSortData.itemData.infoData; if (flag) { SetActive(t, UI.TWN_DIFFICULT_STAR, false); SetActive(t, UI.TXT_NEED_POINT, true); string text = string.Format(StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 6u), MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedPoint(info.questData.tableData.rarity), MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedTimeWithFormat(info.questData.tableData.rarity)); SetLabelText(t, UI.TXT_NEED_POINT, text); } else { SetActive(t, UI.TWN_DIFFICULT_STAR, false); SetActive(t, UI.TXT_NEED_POINT, false); } EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)info.questData.tableData.GetMainEnemyID()); QuestSortData questSortData2 = questSortData; ItemIcon icon = ItemIcon.Create(questSortData2.GetIconType(), questSortData2.GetIconID(), questSortData2.GetRarity(), FindCtrl(t, UI.OBJ_ENEMY), questSortData2.GetIconElement(), null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY); icon.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); SetLabelText(t, UI.LBL_QUEST_NAME, info.questData.tableData.questText); int num = 1; ClearStatusQuestEnemySpecies clearStatusQuestEnemySpecies = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestEnemySpecies(info.questData.tableData.questID); if (clearStatusQuestEnemySpecies != null) { num = clearStatusQuestEnemySpecies.questStatus; } int value = i + 100; SetToggleGroup(t, UI.OBJ_ICON_NEW, value); SetToggleGroup(t, UI.OBJ_ICON_CLEARED, value); SetToggleGroup(t, UI.OBJ_ICON_COMPLETE, value); CLEAR_STATUS cLEAR_STATUS = (CLEAR_STATUS)num; if (cLEAR_STATUS != CLEAR_STATUS.NEW) { SetToggle(t, UI.OBJ_ICON_NEW, false); SetToggle(t, UI.OBJ_ICON_CLEARED, false); SetToggle(t, UI.OBJ_ICON_COMPLETE, false); SetActive(t, UI.OBJ_ICON_ROOT, false); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_NEW, null); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_COMPLETE, null); } else { SetActive(t, UI.OBJ_ICON_ROOT, true); SetToggle(t, UI.OBJ_ICON_NEW, true); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_COMPLETE, null); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_NEW, "ef_ui_questselect_new"); } int num2 = info.questData.num; int num3 = 0; if (MonoBehaviourSingleton <UserInfoManager> .I.isGuildRequestOpen) { num3 = (from g in MonoBehaviourSingleton <GuildRequestManager> .I.guildRequestData.guildRequestItemList where g.questId == (int)info.questData.tableData.questID select g).Count(); } int num4 = num2 - num3; SetLabelText(t, UI.LBL_ORDER_NUM, num4.ToString()); if (num4 <= 0) { t.GetComponent <UIButton>().isEnabled = false; } Transform val = FindCtrl(t, UI.OBJ_FRAME); if (val != null) { UIPanel uiPanel = val.get_gameObject().GetComponent <UIPanel>(); if (uiPanel == null) { uiPanel = val.get_gameObject().AddComponent <UIPanel>(); uiPanel.depth = component.panel.depth + 1; } uiPanel.widgetsAreStatic = false; if (isScrollViewReady) { PanelToStatic(icon, uiPanel); } else { onScrollViewReady = (Action)Delegate.Combine(onScrollViewReady, (Action) delegate { PanelToStatic(icon, uiPanel); }); } } QuestItemInfo itemData = questSortData.itemData; bool is_visible = false; foreach (float remainTime in itemData.remainTimes) { float num5 = remainTime; if (num5 < SHOW_QUEST_REMAIN_LIMIT_SECOND) { is_visible = true; break; } } SetLabelText(t, UI.LBL_REMAIN, StringTable.Get(STRING_CATEGORY.GATE_QUEST_NAME, 1u)); SetActive(t, UI.LBL_REMAIN, is_visible); }
protected void ShowOrder() { if (MonoBehaviourSingleton <InventoryManager> .I.questItemInventory.GetCount() > 0) { List <QuestItemInfo> list = new List <QuestItemInfo>(); MonoBehaviourSingleton <InventoryManager> .I.ForAllQuestInvetory(delegate(QuestItemInfo item) { if (IsSetQuestItemInfoByOrderQuest(item)) { if (isQuestItemDirty) { GetRemainingTimeAndExpiredNum(item, out float remainTime, out int expiredNum); if (remainTime > 0f) { item.infoData.questData.num -= expiredNum; if (item.infoData.questData.num > 0) { list.Add(item); } } } else if (item.infoData.questData.num > 0) { list.Add(item); } } }); Search(ref list); questItemAry = list.ToArray(); } List <QuestGridData> list2 = new List <QuestGridData>(); if (MonoBehaviourSingleton <PartyManager> .IsValid() && MonoBehaviourSingleton <PartyManager> .I.challengeInfo.IsEnable()) { list2.Add(new QuestGridData(QuestGridData.ORDER_QUEST_TYPE.Challenge, null)); } if (questItemAry != null && questItemAry.Length != 0) { QuestSortData[] array = sortSettings.CreateSortAry <QuestItemInfo, QuestSortData>(questItemAry); if (array != null) { int i = 0; for (int num = array.Length; i < num; i++) { QuestSortData questSortData = array[i]; QuestInfoData info = questSortData.itemData.infoData; int num2 = info.questData.num; int num3 = 0; if (MonoBehaviourSingleton <UserInfoManager> .I.isGuildRequestOpen) { num3 = (from g in MonoBehaviourSingleton <GuildRequestManager> .I.guildRequestData.guildRequestItemList where g.questId == (int)info.questData.tableData.questID select g).Count(); } int num4 = num2 - num3; if (num4 > 0) { list2.Add(new QuestGridData(QuestGridData.ORDER_QUEST_TYPE.Quest, array[i])); } } } } questGridDatas = list2.ToArray(); if (questGridDatas == null || questGridDatas.Length == 0) { SetActive((Enum)UI.GRD_ORDER_QUEST, false); SetActive((Enum)UI.STR_ORDER_NON_LIST, true); SetActive((Enum)UI.OBJ_ACTIVE_ROOT, false); SetActive((Enum)UI.OBJ_INACTIVE_ROOT, true); SetLabelText((Enum)UI.LBL_MAX, "0"); SetLabelText((Enum)UI.LBL_NOW, "0"); UIScrollView component = GetCtrl(UI.SCR_ORDER_QUEST).GetComponent <UIScrollView>(); if (component != null) { component.set_enabled(false); component.verticalScrollBar.alpha = 0f; } } else { if (questGridDatas.Length == 1 && questGridDatas[0].orderQuestType == QuestGridData.ORDER_QUEST_TYPE.Challenge) { SetActive((Enum)UI.STR_ORDER_NON_LIST, true); } else { SetActive((Enum)UI.STR_ORDER_NON_LIST, false); } SetActive((Enum)UI.GRD_ORDER_QUEST, true); SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel()); SetToggle((Enum)UI.TGL_ICON_ASC, sortSettings.orderTypeAsc); pageMax = 1 + (questGridDatas.Length - 1) / 10; bool flag = pageMax > 1; SetActive((Enum)UI.OBJ_ACTIVE_ROOT, flag); SetActive((Enum)UI.OBJ_INACTIVE_ROOT, !flag); SetLabelText((Enum)UI.LBL_MAX, pageMax.ToString()); SetLabelText((Enum)UI.LBL_NOW, nowPage.ToString()); UITweener[] transitions = GetCtrl(UI.OBJ_FRAME).GetComponents <UITweener>(); int finishCount = 0; UITweener[] array2 = transitions; foreach (UITweener uITweener in array2) { uITweener.AddOnFinished(delegate { finishCount++; if (finishCount >= transitions.Length) { isTransitionFinished = true; } }); } int num5 = 10 * (nowPage - 1); int num6 = (nowPage != pageMax) ? 10 : (questGridDatas.Length - num5); QuestGridData[] destinationArray = new QuestGridData[num6]; Array.Copy(questGridDatas, num5, destinationArray, 0, num6); questGridDatas = destinationArray; SetGrid(UI.GRD_ORDER_QUEST, string.Empty, 0, true, null, null); SetGrid(UI.GRD_ORDER_QUEST, "QuestListOrderItem", questGridDatas.Length, true, CreateGridListItem, UpdateGridListItem); } }
public QuestGridData(ORDER_QUEST_TYPE type = ORDER_QUEST_TYPE.Quest, QuestSortData data = null) { orderQuestType = type; questSortData = data; }
protected virtual void ShowSelectUI() { //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) int num = (!isInGameScene && TutorialStep.HasQuestSpecialUnlocked()) ? 1 : 2; int num2 = (showMode != 0) ? num : 0; int num3 = (showMode != SHOW_MODE.QUEST) ? num : 0; int num4 = (showMode != SHOW_MODE.ORDER) ? num : 0; SetActive((Enum)UI.OBJ_DELIVERY_ROOT, showMode == SHOW_MODE.DELIVERY); SetActive((Enum)UI.OBJ_QUEST_ROOT, showMode == SHOW_MODE.QUEST); SetActive((Enum)UI.OBJ_ORDER_ROOT, showMode == SHOW_MODE.ORDER); SetButtonSprite((Enum)UI.BTN_DELIVERY, "QuestTabBtnBase" + SPR_ON_OFF[num2], true); SetSprite((Enum)UI.SPR_DELIVERY_TEXT, "QuestTabBtnText" + SPR_INDEX[0] + SPR_ON_OFF[num2]); SetSprite((Enum)UI.SPR_DELIVERY_ICON, "QuestTabBtnIcon" + SPR_INDEX[0] + SPR_ON_OFF[num2]); SetButtonSprite((Enum)UI.BTN_QUEST, "QuestTabBtnBase" + SPR_ON_OFF[num3], true); SetSprite((Enum)UI.SPR_QUEST_TEXT, "QuestTabBtnText" + SPR_INDEX[1] + SPR_ON_OFF[num3]); SetSprite((Enum)UI.SPR_QUEST_ICON, "QuestTabBtnIcon" + SPR_INDEX[1] + SPR_ON_OFF[num3]); SetButtonSprite((Enum)UI.BTN_ORDER, "QuestTabBtnBase" + SPR_ON_OFF[num4], true); SetSprite((Enum)UI.SPR_ORDER_TEXT, "QuestTabBtnText" + SPR_INDEX[2] + SPR_ON_OFF[num4]); SetSprite((Enum)UI.SPR_ORDER_ICON, "QuestTabBtnIcon" + SPR_INDEX[2] + SPR_ON_OFF[num4]); if (!TutorialStep.HasQuestSpecialUnlocked()) { SetButtonEnabled((Enum)UI.BTN_QUEST, false); SetButtonEnabled((Enum)UI.BTN_ORDER, false); SetActive((Enum)UI.BTN_EVENT, false); } if (!isInGameScene) { SetRenderNPCModel((Enum)UI.TEX_NPCMODEL, 0, MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.questCenterNPCPos, MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.questCenterNPCRot, MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.questCenterNPCFOV, (Action <NPCLoader>)null); SetLabelText((Enum)UI.LBL_NPC_MESSAGE, npcText); } SetActive((Enum)UI.OBJ_NPC_MESSAGE, !isInGameScene); if (showMode == SHOW_MODE.DELIVERY) { SetActive((Enum)UI.SPR_TAB_NORMAL, UI.BTN_TAB_NORMAL == selectedTab); SetActive((Enum)UI.SPR_TAB_DAILY, UI.BTN_TAB_DAILY == selectedTab); SetActive((Enum)UI.SPR_TAB_WEEKLY, UI.BTN_TAB_WEEKLY == selectedTab); SetButtonSprite((Enum)UI.BTN_TAB_NORMAL, (selectedTab != UI.BTN_TAB_NORMAL) ? "PickeShopBtn_Normal_off" : "PickeShopBtn_Green_on", false); SetButtonSprite((Enum)UI.BTN_TAB_DAILY, (selectedTab != UI.BTN_TAB_DAILY) ? "PickeShopBtn_Normal_off" : "PickeShopBtn_Green_on", false); SetButtonSprite((Enum)UI.BTN_TAB_WEEKLY, (selectedTab != UI.BTN_TAB_WEEKLY) ? "PickeShopBtn_Normal_off" : "PickeShopBtn_Green_on", false); SetNPCMessage(selectedTab); switch (selectedTab) { case UI.BTN_TAB_NORMAL: SetDeliveryList(normalDeliveryInfo); break; case UI.BTN_TAB_DAILY: SetDeliveryList(dailyDeliveryInfo); break; case UI.BTN_TAB_WEEKLY: SetDeliveryList(weeklyDeliveryInfo); break; } } else if (showMode == SHOW_MODE.ORDER) { if (questItemAry == null && MonoBehaviourSingleton <InventoryManager> .I.questItemInventory.GetCount() > 0) { List <QuestItemInfo> list = new List <QuestItemInfo>(); MonoBehaviourSingleton <InventoryManager> .I.ForAllQuestInvetory(delegate(QuestItemInfo item) { if (item.infoData.questData.num > 0) { list.Add(item); } }); questItemAry = list.ToArray(); GetCtrl(UI.GRD_ORDER_QUEST).DestroyChildren(); } if (questItemAry == null || questItemAry.Length == 0) { SetActive((Enum)UI.BTN_SORT, false); SetActive((Enum)UI.GRD_ORDER_QUEST, false); SetActive((Enum)UI.STR_ORDER_NON_LIST, true); } else { questSortData = sortSettings.CreateSortAry <QuestItemInfo, QuestSortData>(questItemAry); SetActive((Enum)UI.GRD_ORDER_QUEST, true); SetActive((Enum)UI.STR_ORDER_NON_LIST, false); SetActive((Enum)UI.BTN_SORT, true); SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel()); SetToggle((Enum)UI.TGL_ICON_ASC, sortSettings.orderTypeAsc); SetDynamicList((Enum)UI.GRD_ORDER_QUEST, "QuestListOrderItem", questSortData.Length, false, (Func <int, bool>) null, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle) { QuestSpecialSelect questSpecialSelect2 = this; SetActive(t, true); SetEvent(t, "SELECT_ORDER", i); QuestInfoData info2 = this.questSortData[i].itemData.infoData; int num9 = (int)(info2.questData.tableData.difficulty + 1); int l = 0; for (int num10 = difficult.Length; l < num10; l++) { SetActive(t, difficult[l], l < num9); } if (!is_recycle) { ResetTween(t, UI.TWN_DIFFICULT_STAR, 0); PlayTween(t, UI.TWN_DIFFICULT_STAR, true, null, false, 0); } EnemyTable.EnemyData enemyData2 = Singleton <EnemyTable> .I.GetEnemyData((uint)info2.questData.tableData.GetMainEnemyID()); QuestSortData questSortData = this.questSortData[i]; ItemIcon itemIcon2 = ItemIcon.Create(questSortData.GetIconType(), questSortData.GetIconID(), questSortData.GetRarity(), FindCtrl(t, UI.OBJ_ENEMY), questSortData.GetIconElement(), null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY); itemIcon2.SetEnableCollider(false); SetActive(t, UI.SPR_ELEMENT_ROOT, enemyData2.element != ELEMENT_TYPE.MAX); SetElementSprite(t, UI.SPR_ELEMENT, (int)enemyData2.element); SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData2.weakElement); SetActive(t, UI.STR_NON_WEAK_ELEMENT, enemyData2.weakElement == ELEMENT_TYPE.MAX); SetLabelText(t, UI.LBL_QUEST_NAME, info2.questData.tableData.questText); int num11 = 1; ClearStatusQuest clearStatusQuest2 = MonoBehaviourSingleton <QuestManager> .I.clearStatusQuest.Find((ClearStatusQuest data) => info2.questData.tableData.questID == data.questId); if (clearStatusQuest2 != null) { num11 = clearStatusQuest2.questStatus; } int value2 = i + 100; SetToggleGroup(t, UI.OBJ_ICON_NEW, value2); SetToggleGroup(t, UI.OBJ_ICON_CLEARED, value2); SetToggleGroup(t, UI.OBJ_ICON_COMPLETE, value2); switch (num11) { default: SetToggle(t, UI.OBJ_ICON_NEW, false); SetToggle(t, UI.OBJ_ICON_CLEARED, false); SetToggle(t, UI.OBJ_ICON_COMPLETE, false); break; case 1: SetToggle(t, UI.OBJ_ICON_NEW, true); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_NEW, "ef_ui_questselect_new"); break; case 3: SetToggle(t, UI.OBJ_ICON_CLEARED, true); break; case 4: SetToggle(t, UI.OBJ_ICON_COMPLETE, true); SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_COMPLETE, "ef_ui_questselect_complete"); break; } SetLabelText(t, UI.LBL_ORDER_NUM, info2.questData.num.ToString()); SetActive(t, UI.LBL_REMAIN, false); }); } } else if (showMode == SHOW_MODE.QUEST) { if (questInfo == null || questInfo.Length == 0) { SetActive((Enum)UI.GRD_QUEST, false); SetActive((Enum)UI.STR_QUEST_NON_LIST, true); } else { SetActive((Enum)UI.STR_QUEST_NON_LIST, false); SetActive((Enum)UI.GRD_QUEST, true); SetDynamicList((Enum)UI.GRD_QUEST, "QuestListItem", questInfo.Length, false, (Func <int, bool>) null, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle) { QuestSpecialSelect questSpecialSelect = this; SetEvent(t, "SELECT_QUEST", i); QuestInfoData info = questInfo[i]; int num5 = (int)(info.questData.tableData.difficulty + 1); int j = 0; for (int num6 = difficult.Length; j < num6; j++) { SetActive(t, difficult[j], j < num5); } if (!is_recycle) { 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)info.questData.tableData.GetMainEnemyID()); if (enemyData != null) { SetActive(t, UI.OBJ_ENEMY, true); int iconId = enemyData.iconId; RARITY_TYPE?rarity = (info.questData.tableData.questType != QUEST_TYPE.ORDER) ? null : new RARITY_TYPE?(info.questData.tableData.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); } SetLabelText(t, UI.LBL_QUEST_NUM, string.Empty); SetLabelText(t, UI.LBL_QUEST_NAME, info.questData.tableData.questText); if (!info.isExistMission) { SetActive(t, UI.OBJ_MISSION_INFO_ROOT, false); } else { SetActive(t, UI.OBJ_MISSION_INFO_ROOT, true); int k = 0; for (int num7 = info.missionData.Length; k < num7; k++) { SetActive(t, ui_top_crown[k], info.missionData[k] != null); if (info.missionData[k] != null) { SetActive(t, ui_crown[k], info.missionData[k].state >= CLEAR_STATUS.CLEAR); } } } int num8 = 1; ClearStatusQuest clearStatusQuest = MonoBehaviourSingleton <QuestManager> .I.clearStatusQuest.Find((ClearStatusQuest data) => info.questData.tableData.questID == data.questId); if (clearStatusQuest != null) { num8 = clearStatusQuest.questStatus; } int value = i + 100; SetToggleGroup(t, UI.OBJ_ICON_NEW, value); SetToggleGroup(t, UI.OBJ_ICON_CLEARED, value); SetToggleGroup(t, UI.OBJ_ICON_COMPLETE, value); switch (num8) { default: SetToggle(t, UI.OBJ_ICON_NEW, false); SetToggle(t, UI.OBJ_ICON_CLEARED, false); SetToggle(t, UI.OBJ_ICON_COMPLETE, false); break; case 1: SetToggle(t, UI.OBJ_ICON_NEW, true); SetVisibleWidgetEffect(UI.SCR_NORMAL_QUEST, t, UI.SPR_ICON_NEW, "ef_ui_questselect_new"); break; case 3: SetToggle(t, UI.OBJ_ICON_CLEARED, true); break; case 4: SetToggle(t, UI.OBJ_ICON_COMPLETE, true); SetVisibleWidgetEffect(UI.SCR_NORMAL_QUEST, t, UI.SPR_ICON_COMPLETE, "ef_ui_questselect_complete"); break; } }); } } }
public static ItemIcon CreateQuestItemIcon(ITEM_ICON_TYPE icon_type, int icon_id, RARITY_TYPE?rarity, QuestSortData quest_item, bool is_show_main_status, Transform parent = null, int num = -1, string name = null, string event_name = null, int event_data = 0, int toggle_group = -1, bool is_select = false, bool is_new = false) { ItemIconDetail itemIconDetail = ItemIcon.CreateIcon <ItemIconDetail>(MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.itemIconDetailPrefab, icon_type, icon_id, rarity, parent, quest_item.GetEnemyElement(), null, -1, event_name, event_data, is_new, toggle_group, is_select, string.Empty, false, 0, 0, false, QUEST_ICON_SIZE_TYPE.DEFAULT, GET_TYPE.PAY); itemIconDetail.setupperQuestItem.Set(new object[2] { quest_item, is_show_main_status }); return(itemIconDetail); }