private void InitializeTab(SubQuestTypes subtype) { if (subtype == SubQuestTypes.Special) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabTriple, (UnityEngine.Object)null)) { this.TabTriple.SetActive(true); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabDouble, (UnityEngine.Object)null)) { this.TabDouble.SetActive(false); } this.mCurrentTab = this.TabTriple; this.mCurrentTabPages = this.TripleTabPages; for (int index = 0; index < this.TripleTabPages.Length; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: method pointer ((UnityEvent <bool>) this.TripleTabPages[index].onValueChanged).AddListener(new UnityAction <bool>((object)new EventQuestList.\u003CInitializeTab\u003Ec__AnonStorey327() { \u003C\u003Ef__this = this, index = index }, __methodptr(\u003C\u003Em__361))); } } else { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabTriple, (UnityEngine.Object)null)) { this.TabTriple.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabDouble, (UnityEngine.Object)null)) { this.TabDouble.SetActive(true); } this.mCurrentTab = this.TabDouble; this.mCurrentTabPages = this.DoubleTabPages; for (int index = 0; index < this.DoubleTabPages.Length; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: method pointer ((UnityEvent <bool>) this.DoubleTabPages[index].onValueChanged).AddListener(new UnityAction <bool>((object)new EventQuestList.\u003CInitializeTab\u003Ec__AnonStorey328() { \u003C\u003Ef__this = this, index = index }, __methodptr(\u003C\u003Em__362))); } } }
private void Awake() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null)) { this.ItemTemplate.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Caution, (UnityEngine.Object)null)) { this.Caution.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestTypeTextFrame, (UnityEngine.Object)null)) { this.QuestTypeTextFrame.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabTriple, (UnityEngine.Object)null)) { this.TabTriple.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TabDouble, (UnityEngine.Object)null)) { this.TabDouble.SetActive(false); } if (!string.IsNullOrEmpty((string)GlobalVars.SelectedChapter)) { ChapterParam area = MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedChapter); if (area != null) { this.mEventType = !area.IsGpsQuest() ? (!area.IsKeyQuest() ? (!area.IsBeginnerQuest() ? EventQuestList.EventQuestTypes.Normal : EventQuestList.EventQuestTypes.Beginner) : EventQuestList.EventQuestTypes.Key) : EventQuestList.EventQuestTypes.Gps; } } else { if (GlobalVars.ReqEventPageListType == GlobalVars.EventQuestListType.KeyQuest) { ChapterParam[] chapters = MonoSingleton <GameManager> .Instance.Chapters; if (chapters != null) { for (int index = 0; index < chapters.Length; ++index) { if (chapters[index].IsKeyQuest()) { this.mEventType = EventQuestList.EventQuestTypes.Key; break; } } } } if (GlobalVars.ReqEventPageListType == GlobalVars.EventQuestListType.BeginnerQuest) { ChapterParam[] chapters = MonoSingleton <GameManager> .Instance.Chapters; if (chapters != null) { for (int index = 0; index < chapters.Length; ++index) { if (chapters[index].IsBeginnerQuest()) { this.mEventType = EventQuestList.EventQuestTypes.Beginner; break; } } } } if (GlobalVars.ReqEventPageListType == GlobalVars.EventQuestListType.Tower && this.IsOpendTower()) { this.mEventType = EventQuestList.EventQuestTypes.Tower; } if (GlobalVars.ReqEventPageListType == GlobalVars.EventQuestListType.RankingQuest && MonoSingleton <GameManager> .Instance.AvailableRankingQuesstParams.Count > 0) { GlobalVars.RankingQuestSelected = true; this.mEventType = EventQuestList.EventQuestTypes.Ranking; this.RefreshQuestTypeText(this.mEventType); FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); return; } } SubQuestTypes highestPrioritySubType = this.GetHighestPrioritySubType(); this.InitializeTab(highestPrioritySubType); this.mTabIndex = (int)highestPrioritySubType; if (this.mEventType == EventQuestList.EventQuestTypes.Beginner && this.DisabledInBeginnerQuest != null && this.DisabledInBeginnerQuest.Length > 0) { foreach (GameObject gameObject in this.DisabledInBeginnerQuest) { gameObject.SetActive(false); } } if (this.RefreshOnStart) { this.Refresh(this.mEventType); } this.RefreshQuestTypeText(this.mEventType); }
private void Refresh(EventQuestList.EventQuestTypes type) { GameUtility.DestroyGameObjects <ListItemEvents>(this.mItems); this.mItems.Clear(); GameManager instance = MonoSingleton <GameManager> .Instance; ChapterParam[] chapters = instance.Chapters; QuestParam[] availableQuests = instance.Player.AvailableQuests; long serverTime = Network.GetServerTime(); ChapterParam currentChapter = (ChapterParam)null; List <ChapterParam> availableChapters = this.GetAvailableChapters(type, chapters, availableQuests, (string)GlobalVars.SelectedSection, (string)GlobalVars.SelectedChapter, serverTime, out currentChapter); if (type == EventQuestList.EventQuestTypes.Normal) { SubQuestTypes mTabIndex = (SubQuestTypes)this.mTabIndex; for (int index = 0; index < availableChapters.Count; ++index) { if (availableChapters[index].GetSubQuestType() != mTabIndex) { availableChapters.RemoveAt(index--); } } } if (this.Descending) { availableChapters.Reverse(); } if (type == EventQuestList.EventQuestTypes.Tower && string.IsNullOrEmpty(GlobalVars.SelectedChapter.Get())) { List <TowerParam> towerParamList = new List <TowerParam>(); for (int index1 = 0; index1 < instance.Towers.Length; ++index1) { TowerParam tower = instance.Towers[index1]; for (int index2 = 0; index2 < availableQuests.Length; ++index2) { if (availableQuests[index2].type == QuestTypes.Tower && !(availableQuests[index2].iname != tower.iname) && availableQuests[index2].IsDateUnlock(serverTime)) { towerParamList.Add(tower); break; } } } for (int index = 0; index < towerParamList.Count; ++index) { TowerParam data = towerParamList[index]; ListItemEvents listItemEvents1 = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null) ? (ListItemEvents)null : (ListItemEvents)this.ItemTemplate.GetComponent <ListItemEvents>(); if (!string.IsNullOrEmpty(data.prefabPath)) { StringBuilder stringBuilder = GameUtility.GetStringBuilder(); stringBuilder.Append("QuestChapters/"); stringBuilder.Append(data.prefabPath); listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString()); } if (!UnityEngine.Object.op_Equality((UnityEngine.Object)listItemEvents1, (UnityEngine.Object)null)) { QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(data.iname); ListItemEvents listItemEvents2 = (ListItemEvents)UnityEngine.Object.Instantiate <ListItemEvents>((M0)listItemEvents1); DataSource.Bind <TowerParam>(((Component)listItemEvents2).get_gameObject(), data); DataSource.Bind <QuestParam>(((Component)listItemEvents2).get_gameObject(), quest); ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false); ((Component)listItemEvents2).get_gameObject().SetActive(true); listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnTowerSelect); this.mItems.Add(listItemEvents2); } } for (int index = 0; index < availableQuests.Length; ++index) { if (availableQuests[index].IsMultiTower && availableQuests[index].IsDateUnlock(serverTime)) { ListItemEvents listItemEvents1 = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null) ? (ListItemEvents)null : (ListItemEvents)this.ItemTemplate.GetComponent <ListItemEvents>(); ChapterParam chapter = availableQuests[index].Chapter; if (chapter != null) { if (!string.IsNullOrEmpty(chapter.prefabPath)) { StringBuilder stringBuilder = GameUtility.GetStringBuilder(); stringBuilder.Append("QuestChapters/"); stringBuilder.Append(chapter.prefabPath); listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString()); } if (!UnityEngine.Object.op_Equality((UnityEngine.Object)listItemEvents1, (UnityEngine.Object)null)) { ListItemEvents listItemEvents2 = (ListItemEvents)UnityEngine.Object.Instantiate <ListItemEvents>((M0)listItemEvents1); DataSource.Bind <QuestParam>(((Component)listItemEvents2).get_gameObject(), availableQuests[index]); ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false); ((Component)listItemEvents2).get_gameObject().SetActive(true); listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnMultiTowerSelect); this.mItems.Add(listItemEvents2); } } } } } for (int index = 0; index < availableChapters.Count; ++index) { ChapterParam data = availableChapters[index]; ListItemEvents listItemEvents1 = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null) ? (ListItemEvents)null : (ListItemEvents)this.ItemTemplate.GetComponent <ListItemEvents>(); if (!string.IsNullOrEmpty(data.prefabPath)) { StringBuilder stringBuilder = GameUtility.GetStringBuilder(); stringBuilder.Append("QuestChapters/"); stringBuilder.Append(data.prefabPath); listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString()); } if (!UnityEngine.Object.op_Equality((UnityEngine.Object)listItemEvents1, (UnityEngine.Object)null)) { ListItemEvents listItemEvents2 = (ListItemEvents)UnityEngine.Object.Instantiate <ListItemEvents>((M0)listItemEvents1); DataSource.Bind <ChapterParam>(((Component)listItemEvents2).get_gameObject(), data); DataSource.Bind <KeyItem>(((Component)listItemEvents2).get_gameObject(), data == null || data.keys.Count <= 0 ? (KeyItem)null : data.keys[0]); KeyQuestBanner component = (KeyQuestBanner)((Component)listItemEvents2).get_gameObject().GetComponent <KeyQuestBanner>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.UpdateValue(); } ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false); ((Component)listItemEvents2).get_gameObject().SetActive(true); listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnNodeSelect); this.mItems.Add(listItemEvents2); } } this.StableSort <ListItemEvents>(this.mItems, (Comparison <ListItemEvents>)((p1, p2) => { ChapterParam chapterParam1 = !UnityEngine.Object.op_Inequality((UnityEngine.Object)p1, (UnityEngine.Object)null) ? (ChapterParam)null : p1.Chapter; ChapterParam chapterParam2 = !UnityEngine.Object.op_Inequality((UnityEngine.Object)p2, (UnityEngine.Object)null) ? (ChapterParam)null : p2.Chapter; return((chapterParam1 == null ? 1 : (!chapterParam1.IsGpsQuest() ? 1 : 0)).CompareTo(chapterParam2 == null ? 1 : (!chapterParam2.IsGpsQuest() ? 1 : 0))); })); for (int index = 0; index < this.mItems.Count; ++index) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mItems[index], (UnityEngine.Object)null)) { ((Component)this.mItems[index]).get_gameObject().get_transform().SetSiblingIndex(index); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BackButton, (UnityEngine.Object)null)) { if (currentChapter != null) { this.BackButton.SetActive(true); } else if (!string.IsNullOrEmpty((string)GlobalVars.SelectedSection)) { this.BackButton.SetActive(!this.IsSectionHidden((string)GlobalVars.SelectedSection)); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Caution, (UnityEngine.Object)null)) { this.Caution.SetActive(availableChapters.Count == 0 && type != EventQuestList.EventQuestTypes.Tower); } this.RefreshSwitchButton(type); if (type == EventQuestList.EventQuestTypes.Normal) { this.EnableTab(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestTypeTextFrame, (UnityEngine.Object)null)) { this.QuestTypeTextFrame.SetActive(false); } this.SetToggleIsOn(); } else { this.DisableTab(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestTypeTextFrame, (UnityEngine.Object)null)) { this.QuestTypeTextFrame.SetActive(true); } this.RefreshQuestTypeText(type); } this.ResetScroll(); FlowNode_GameObject.ActivateOutputLinks((Component)this, 50); }