Пример #1
0
        private void OnSelectItem(GameObject go)
        {
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ScrollRect, (UnityEngine.Object)null) && this.ListID != 0)
            {
                QuestListV2.mScrollPosCache[this.ListID] = this.ScrollRect.get_verticalNormalizedPosition();
            }
            GlobalVars.SelectedRankingQuestParam = DataSource.FindDataOfClass <RankingQuestParam>(go, (RankingQuestParam)null);
            QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(go, (QuestParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            if (dataOfClass.IsKeyQuest && !dataOfClass.IsKeyUnlock(-1L))
            {
                if (dataOfClass.Chapter != null && dataOfClass.Chapter.CheckHasKeyItem() && dataOfClass.IsDateUnlock(-1L))
                {
                    GlobalVars.KeyQuestTimeOver = true;
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
                }
                else
                {
                    UIUtility.SystemMessage(LocalizedText.Get("sys.KEYQUEST_UNLOCK"), LocalizedText.Get("sys.KEYQUEST_AVAILABLE_CAUTION"), new UIUtility.DialogResultEvent(this.OnCloseKeyQuest), (GameObject)null, true, -1);
                }
            }
            else
            {
                GlobalVars.SelectedQuestID = dataOfClass.iname;
                GlobalVars.LastQuestState.Set(dataOfClass.state);
                if (dataOfClass.IsScenario)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
                }
                else
                {
                    if ((int)dataOfClass.aplv > MonoSingleton <GameManager> .Instance.Player.Lv)
                    {
                        NotifyList.Push(LocalizedText.Get("sys.QUEST_AP_CONDITION", new object[1]
                        {
                            (object)dataOfClass.aplv
                        }));
                    }
                    FlowNode_OnQuestSelect objectOfType = (FlowNode_OnQuestSelect)UnityEngine.Object.FindObjectOfType <FlowNode_OnQuestSelect>();
                    if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)objectOfType, (UnityEngine.Object)null))
                    {
                        return;
                    }
                    objectOfType.Selected();
                }
            }
        }