Beispiel #1
0
        private void OnSelectItem(GameObject go)
        {
            QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(go, (QuestParam)null);

            if (dataOfClass == null || !Object.op_Inequality((Object)QuestDropParam.Instance, (Object)null))
            {
                return;
            }
            bool flag = QuestDropParam.Instance.IsChangedQuestDrops(dataOfClass);

            GlobalVars.SetDropTableGeneratedTime();
            if (flag && !QuestDropParam.Instance.IsWarningPopupDisable)
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.PARTYEDITOR_DROP_TABLE"), (UIUtility.DialogResultEvent)(obj =>
                {
                    ListItemEvents component = (ListItemEvents)go.GetComponent <ListItemEvents>();
                    if (!Object.op_Inequality((Object)component, (Object)null))
                    {
                        return;
                    }
                    component.OpenDetail();
                }), (GameObject)null, false, -1);
            }
            else
            {
                GlobalVars.SelectedQuestID = dataOfClass.iname;
                DebugUtility.Log("Select Quest:" + GlobalVars.SelectedQuestID);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
            }
        }
Beispiel #2
0
        public void Activated(int pinID)
        {
            if (99 <= pinID && pinID < 123)
            {
                TrophyState[] trophyStates = MonoSingleton <GameManager> .Instance.Player.TrophyStates;
                if (trophyStates != null)
                {
                    for (int index = 0; index < trophyStates.Length; ++index)
                    {
                        if (trophyStates[index].IsCompleted)
                        {
                            TrophyParam trophy = MonoSingleton <GameManager> .Instance.MasterParam.GetTrophy(trophyStates[index].iname);

                            if (trophy != null)
                            {
                                GameCenterManager.SendAchievementProgress(trophy.iname);
                            }
                        }
                    }
                }
                MonoSingleton <GameManager> .Instance.Player.OnPlayerLevelChange(1);

                if (this.mDesirdSceneSet)
                {
                    return;
                }
                // ISSUE: object of a compiler-generated type is created
                // ISSUE: variable of a compiler-generated type
                HomeWindow.\u003CActivated\u003Ec__AnonStorey33C activatedCAnonStorey33C = new HomeWindow.\u003CActivated\u003Ec__AnonStorey33C();
                // ISSUE: reference to a compiler-generated field
                activatedCAnonStorey33C.desiredSceneName = (string)null;
                bool flag1 = false;
                bool flag2 = GlobalVars.ForceSceneChange;
                GlobalVars.ForceSceneChange = false;
                if (pinID == 99)
                {
                    SectionParam homeWorld = HomeUnitController.GetHomeWorld();
                    if (homeWorld != null)
                    {
                        // ISSUE: reference to a compiler-generated field
                        activatedCAnonStorey33C.desiredSceneName = homeWorld.home;
                        flag1 = true;
                    }
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    activatedCAnonStorey33C.desiredSceneName = this.SceneNames[pinID - 100];
                }
                // ISSUE: reference to a compiler-generated method
                if (Array.FindIndex <string>(this.IgnoreSameSceneCheck, new Predicate <string>(activatedCAnonStorey33C.\u003C\u003Em__391)) != -1)
                {
                    flag2 = true;
                }
                // ISSUE: reference to a compiler-generated field
                // ISSUE: reference to a compiler-generated field
                if (!string.IsNullOrEmpty(activatedCAnonStorey33C.desiredSceneName) && (flag2 || this.mLastSceneName != activatedCAnonStorey33C.desiredSceneName))
                {
                    if (!MonoSingleton <GameManager> .Instance.PrepareSceneChange())
                    {
                        return;
                    }
                    this.mDesirdSceneSet = true;
                    // ISSUE: reference to a compiler-generated field
                    this.mDesiredSceneName   = activatedCAnonStorey33C.desiredSceneName;
                    this.mDesiredSceneIsHome = flag1;
                    if ((MonoSingleton <GameManager> .Instance.Player.TutorialFlags & 1L) == 0L)
                    {
                        GameManager instance = MonoSingleton <GameManager> .Instance;
                        if (!this.mDesiredSceneIsHome)
                        {
                            // ISSUE: reference to a compiler-generated field
                            if (activatedCAnonStorey33C.desiredSceneName == "Home_Gacha")
                            {
                                if (instance.GetNextTutorialStep() != "ShowFreeGachaButton" && instance.GetNextTutorialStep() != "ShowSummonButton")
                                {
                                    this.mDesirdSceneSet = false;
                                }
                            }
                            else
                            {
                                // ISSUE: reference to a compiler-generated field
                                if (activatedCAnonStorey33C.desiredSceneName == "Home_UnitList")
                                {
                                    if (instance.GetNextTutorialStep() != "ShowUnitList" && instance.GetNextTutorialStep() != "ShowUnitButton")
                                    {
                                        this.mDesirdSceneSet = false;
                                    }
                                }
                                else
                                {
                                    // ISSUE: reference to a compiler-generated field
                                    if (activatedCAnonStorey33C.desiredSceneName == "world001")
                                    {
                                        if (instance.GetNextTutorialStep() != "ShowQuestItem" && instance.GetNextTutorialStep() != "ShowStoryButton")
                                        {
                                            this.mDesirdSceneSet = false;
                                        }
                                    }
                                    else
                                    {
                                        this.mDesirdSceneSet = false;
                                        return;
                                    }
                                }
                            }
                        }
                    }
                    this.mIgnorePopups = !this.mDesiredSceneIsHome;
                    GlobalVars.SetDropTableGeneratedTime();
                }
                else
                {
                    if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)GameObject.Find("EventQuest"), (UnityEngine.Object)null))
                    {
                        return;
                    }
                    GlobalEvent.Invoke("UPDATE_EVENT_LIST", (object)this);
                }
            }
            else
            {
                switch (pinID)
                {
                case 12:
                    this.mFadingOut = false;
                    break;

                case 30:
                    if (this.RestoreScenes == null)
                    {
                        break;
                    }
                    GlobalVars.IsTutorialEnd = true;
                    if (HomeWindow.mRestorePoint != RestorePoints.Home)
                    {
                        if (!this.IsNotHomeBGM())
                        {
                            FlowNode_PlayBGM.PlayHomeBGM();
                        }
                        for (int index = 0; index < this.RestoreScenes.Length; ++index)
                        {
                            if (this.RestoreScenes[index].Type == HomeWindow.mRestorePoint)
                            {
                                this.Activated(100 + this.RestoreScenes[index].Index);
                                return;
                            }
                        }
                    }
                    this.Activated(99);
                    break;

                case 1002:
                    this.mStateMachine.GotoState <HomeWindow.State_Tutorial>();
                    break;
                }
            }
        }
Beispiel #3
0
        public void Activated(int pinID)
        {
            if (99 <= pinID && pinID < 129)
            {
                if (this.mDesirdSceneSet)
                {
                    return;
                }
                string desiredSceneName = (string)null;
                bool   flag1            = false;
                bool   flag2            = GlobalVars.ForceSceneChange;
                GlobalVars.ForceSceneChange = false;
                if (pinID == 99)
                {
                    SectionParam homeWorld = HomeUnitController.GetHomeWorld();
                    if (homeWorld != null)
                    {
                        desiredSceneName = homeWorld.home;
                        flag1            = true;
                    }
                }
                else
                {
                    desiredSceneName = this.SceneNames[pinID - 100];
                }
                if (Array.FindIndex <string>(this.IgnoreSameSceneCheck, (Predicate <string>)(scene => scene.Equals(desiredSceneName))) != -1)
                {
                    flag2 = true;
                }
                if (!string.IsNullOrEmpty(desiredSceneName) && (flag2 || this.mLastSceneName != desiredSceneName))
                {
                    if (!MonoSingleton <GameManager> .Instance.PrepareSceneChange())
                    {
                        return;
                    }
                    this.SceneChangeSendLog(this.mDesiredSceneName, desiredSceneName);
                    this.mDesirdSceneSet     = true;
                    this.mDesiredSceneName   = desiredSceneName;
                    this.mDesiredSceneIsHome = flag1;
                    this.mIgnorePopups       = !this.mDesiredSceneIsHome;
                    GlobalVars.SetDropTableGeneratedTime();
                }
                else
                {
                    if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)GameObject.Find("EventQuest"), (UnityEngine.Object)null))
                    {
                        return;
                    }
                    GlobalEvent.Invoke("UPDATE_EVENT_LIST", (object)this);
                }
            }
            else
            {
                switch (pinID)
                {
                case 12:
                    this.mFadingOut = false;
                    break;

                case 30:
                    if (this.RestoreScenes == null)
                    {
                        break;
                    }
                    GlobalVars.IsTutorialEnd = true;
                    if (HomeWindow.mRestorePoint != RestorePoints.Home)
                    {
                        if (!this.IsNotHomeBGM())
                        {
                            FlowNode_PlayBGM.PlayHomeBGM();
                        }
                        for (int index = 0; index < this.RestoreScenes.Length; ++index)
                        {
                            if (this.RestoreScenes[index].Type == HomeWindow.mRestorePoint)
                            {
                                this.Activated(100 + this.RestoreScenes[index].Index);
                                return;
                            }
                        }
                    }
                    this.Activated(99);
                    break;

                case 1001:
                    this.mRankmatchRewarded = true;
                    break;

                case 2001:
                    HomeWindow.BeginnerNotified = true;
                    break;
                }
            }
        }