private void RefreshItems() { Transform transform = ((Component)this).get_transform(); this.ClearItems(); if (Object.op_Equality((Object)this.ItemTemplate, (Object)null)) { return; } if (Object.op_Inequality((Object)this.AreaInfo, (Object)null) && !string.IsNullOrEmpty((string)GlobalVars.SelectedSection)) { DataSource.Bind <ChapterParam>(this.AreaInfo, MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedSection)); } QuestParam[] array = this.mQuests.ToArray(); if (this.Descending) { Array.Reverse((Array)array); } bool flag = false; GameManager instance = MonoSingleton <GameManager> .Instance; if (this.isTriggeredRefresh && (instance.Player.TutorialFlags & 1L) == 0L) { flag = instance.GetNextTutorialStep() == "ShowQuestItem"; } for (int index = 0; index < array.Length; ++index) { QuestParam questParam = array[index]; if (questParam.difficulty == this.mDifficultyFilter) { GameObject gameObject1 = (GameObject)null; if (!string.IsNullOrEmpty(questParam.ItemLayout)) { gameObject1 = this.LoadQuestListItem(questParam); } if (Object.op_Equality((Object)gameObject1, (Object)null)) { gameObject1 = questParam.difficulty != QuestDifficulties.Elite ? (!questParam.IsScenario ? (!Object.op_Inequality((Object)this.SpecialQuestItem, (Object)null) || !this.HasEliteQuest(questParam) ? (questParam.GetChallangeLimit() <= 0 ? this.ItemTemplate : this.EventTemplateLimit) : this.SpecialQuestItem) : this.ScenarioQuestItem) : (!questParam.CheckEnableChallange() ? this.EliteQuestDisAbleItem : this.EliteQuestItem); } if (!Object.op_Equality((Object)gameObject1, (Object)null)) { GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); ((Object)gameObject2).set_hideFlags((HideFlags)52); DataSource.Bind <QuestParam>(gameObject2, questParam); QuestCampaignData[] questCampaigns = MonoSingleton <GameManager> .Instance.FindQuestCampaigns(questParam); DataSource.Bind <QuestCampaignData[]>(gameObject2, questCampaigns.Length != 0 ? questCampaigns : (QuestCampaignData[])null); ListItemEvents component = (ListItemEvents)gameObject2.GetComponent <ListItemEvents>(); component.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelectItem); component.OnOpenDetail = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail); component.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail); gameObject2.get_transform().SetParent(transform, false); gameObject2.get_gameObject().SetActive(true); this.AddItem(component); if (flag && questParam.iname == "QE_ST_NO_010001") { SGHighlightObject.Instance().highlightedObject = ((Component)component).get_gameObject(); SGHighlightObject.Instance().Highlight(string.Empty, "sg_tut_1.034", (SGHighlightObject.OnActivateCallback)null, EventDialogBubble.Anchors.BottomRight, true, false, false); component.OnOpenDetail = (ListItemEvents.ListItemEvent)null; } } } } }
private void RefreshItems() { Transform transform = ((Component)this).get_transform(); this.ClearItems(); if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null)) { return; } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AreaInfo, (UnityEngine.Object)null) && !string.IsNullOrEmpty((string)GlobalVars.SelectedSection)) { DataSource.Bind <ChapterParam>(this.AreaInfo, MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedSection)); } QuestParam[] array = this.mQuests.ToArray(); if (this.Descending) { Array.Reverse((Array)array); } for (int index = 0; index < array.Length; ++index) { QuestParam questParam = array[index]; if (questParam.difficulty == this.mDifficultyFilter) { GameObject gameObject1 = (GameObject)null; if (!string.IsNullOrEmpty(questParam.ItemLayout)) { gameObject1 = this.LoadQuestListItem(questParam); } if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject1, (UnityEngine.Object)null)) { gameObject1 = questParam.difficulty != QuestDifficulties.Elite ? (questParam.difficulty != QuestDifficulties.Extra ? (!questParam.IsScenario ? (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SpecialQuestItem, (UnityEngine.Object)null) || !this.HasEliteQuest(questParam) ? (questParam.GetChallangeLimit() <= 0 ? (!questParam.IsExtra ? this.ItemTemplate : this.ExtraQuestItem) : this.EventTemplateLimit) : this.SpecialQuestItem) : this.ScenarioQuestItem) : (!questParam.CheckEnableChallange() ? this.StoryExtraQuestDisableItem : this.StoryExtraQuestItem)) : (!questParam.CheckEnableChallange() ? this.EliteQuestDisAbleItem : this.EliteQuestItem); } if (!UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject1, (UnityEngine.Object)null)) { GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)gameObject1); ((UnityEngine.Object)gameObject2).set_hideFlags((HideFlags)52); DataSource.Bind <QuestParam>(gameObject2, questParam); RankingQuestParam availableRankingQuest = MonoSingleton <GameManager> .Instance.FindAvailableRankingQuest(questParam.iname); DataSource.Bind <RankingQuestParam>(gameObject2, availableRankingQuest); DataSource.Bind <QuestParam>(gameObject2, questParam); QuestCampaignData[] questCampaigns = MonoSingleton <GameManager> .Instance.FindQuestCampaigns(questParam); DataSource.Bind <QuestCampaignData[]>(gameObject2, questCampaigns.Length != 0 ? questCampaigns : (QuestCampaignData[])null); ListItemEvents component = (ListItemEvents)gameObject2.GetComponent <ListItemEvents>(); component.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelectItem); component.OnOpenDetail = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail); component.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail); gameObject2.get_transform().SetParent(transform, false); gameObject2.get_gameObject().SetActive(true); this.AddItem(component); } } } }