public void UnlockContents() { if (!this.mDesiredSceneIsHome || this.mDesirdSceneSet || ((CriticalSection.GetActive() & CriticalSections.SceneChange) != (CriticalSections)0 || !PlayerPrefs.HasKey("lastplv")) || !PlayerPrefs.HasKey("lastviplv")) { return; } PlayerData player = MonoSingleton <GameManager> .Instance.Player; int num1 = PlayerPrefs.GetInt("lastplv"); int lv = player.Lv; int num2 = PlayerPrefs.GetInt("lastviplv"); int vipRank = player.VipRank; if (num1 >= lv && num2 >= vipRank) { return; } foreach (UnlockParam unlock in MonoSingleton <GameManager> .Instance.MasterParam.Unlocks) { if ((unlock.PlayerLevel == 0 || num1 < unlock.PlayerLevel && unlock.PlayerLevel <= lv) && (unlock.VipRank == 0 || num2 < unlock.VipRank && unlock.VipRank <= vipRank)) { NotifyList.PushContentsUnlock(unlock); } } PlayerPrefs.SetInt("lastplv", lv); PlayerPrefs.SetInt("lastviplv", vipRank); LevelLock.UpdateLockStates(); }
private void OnDestroy() { if (!Object.op_Equality((Object)NotifyList.mInstance, (Object)this)) { return; } NotifyList.mInstance = (NotifyList)null; }
private void NotifySupportResult() { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player.SupportGold <= 0) { return; } NotifyList.PushQuestSupport(player.SupportCount, player.SupportGold); }
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(); } } }
public static void SetBadge(bool value) { if (MultiInvitationReceiveWindow.m_Instance == null && value) { if (MultiInvitationBadge.isValid) { return; } MultiInvitationBadge.isValid = value; NotifyList.PushMultiInvitation(); } else { MultiInvitationBadge.isValid = false; } }
private void NotifyNewFriendRequests() { PlayerData player = MonoSingleton <GameManager> .Instance.Player; int num = 0; StringBuilder stringBuilder = new StringBuilder(200); string[] array; if (PlayerPrefs.HasKey("FRIENDS")) { array = PlayerPrefs.GetString("FRIENDS").Split(','); } else { array = new string[0]; } for (int index = 0; index < player.FollowerUID.Count; ++index) { if (Array.IndexOf <string>(array, player.FollowerUID[index]) < 0) { ++num; } if (stringBuilder.Length > 0) { stringBuilder.Append(','); } stringBuilder.Append(player.FollowerUID[index]); } if (num > 0) { NotifyList.Push(LocalizedText.Get("sys.FRIENDREQS", new object[1] { (object)num })); } PlayerPrefs.SetString("FRIENDS", stringBuilder.ToString()); PlayerPrefs.Save(); }
private void Awake() { if (Object.op_Inequality((Object)NotifyList.mInstance, (Object)null)) { Object.Destroy((Object)((Component)this).get_gameObject()); } else { NotifyList.mInstance = this; if (Object.op_Inequality((Object)this.Item_Generic, (Object)null) && ((Component)this.Item_Generic).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_Generic).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.Item_LoginBonus, (Object)null) && ((Component)this.Item_LoginBonus).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_LoginBonus).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.Item_Mission, (Object)null) && ((Component)this.Item_Mission).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_Mission).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.Item_DailyMission, (Object)null) && ((Component)this.Item_DailyMission).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_DailyMission).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.Item_ContentsUnlock, (Object)null) && ((Component)this.Item_ContentsUnlock).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_ContentsUnlock).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.Item_QuestSupport, (Object)null) && ((Component)this.Item_QuestSupport).get_gameObject().get_activeInHierarchy()) { ((Component)this.Item_QuestSupport).get_gameObject().SetActive(false); } NotifyList.mNotifyEnable = true; Object.DontDestroyOnLoad((Object)((Component)this).get_gameObject()); } }
private void MiscBeforeDefaultState() { this.NotifyNewFriendRequests(); if (HomeWindow.EnterHomeCount == 0) { this.CheckTrophies(); } if (this.mNewsShown || GlobalVars.IsTitleStart.Get() || !MonoSingleton <GameManager> .Instance.Player.IsFirstLogin && !this.DebugLoginBonus) { return; } this.mNewsShown = true; Json_LoginBonus recentLoginBonus = MonoSingleton <GameManager> .Instance.Player.RecentLoginBonus; if (recentLoginBonus != null) { string iname; int num; if (recentLoginBonus.coin > 0) { iname = "$COIN"; num = recentLoginBonus.coin; } else { iname = recentLoginBonus.iname; num = recentLoginBonus.num; } ItemData data = new ItemData(); if (data.Setup(0L, iname, num)) { NotifyList.PushLoginBonus(data); } } this.NotifySupportResult(); }
public override void Update(HomeWindow self) { if (this.state == 0) { self.mFadingOut = true; FlowNode_GameObject.ActivateOutputLinks((Component)self, 11); this.state = 1; } if (this.state == 1) { if (!AssetDownloader.isDone) { return; } if (AssetManager.IsAssetBundle(self.mDesiredSceneName)) { AssetManager.PrepareAssets(self.mDesiredSceneName); if (!AssetDownloader.isDone) { ProgressWindow.OpenGenericDownloadWindow(); AssetDownloader.StartDownload(false, true, ThreadPriority.Normal); this.state = 2; return; } } this.state = 3; } if (this.state == 2) { if (!AssetDownloader.isDone) { return; } ProgressWindow.Close(); this.state = 3; } if (this.state == 3) { self.mLastSceneName = self.mDesiredSceneName; this.req = AssetManager.LoadSceneAsync(self.mDesiredSceneName, true); this.state = 4; } if (this.state == 4) { if (!this.req.canBeActivated || self.mFadingOut || MonoSingleton <GameManager> .Instance.IsImportantJobRunning) { return; } if (!string.IsNullOrEmpty(self.UnloadTrigger)) { GlobalEvent.Invoke(self.UnloadTrigger, (object)this); } SceneAwakeObserver.AddListener(new SceneAwakeObserver.SceneEvent(this.OnSceneAwake)); this.req.ActivateScene(); if (!string.IsNullOrEmpty(self.mLastSceneName)) { AssetManager.UnloadScene(self.mLastSceneName); } this.state = 5; } if (this.state == 5) { if (Object.op_Equality((Object)this.mNewScene, (Object)null) || !this.req.isDone) { return; } CriticalSection.Leave(CriticalSections.SceneChange); this.state = 6; } if (this.state == 6) { if (CriticalSection.IsActive) { return; } GC.Collect(); this.asyncOp = AssetManager.UnloadUnusedAssets(); this.state = (MonoSingleton <GameManager> .Instance.Player.TutorialFlags & 1L) != 0L ? 7 : 101; } if (this.state == 7) { if (this.asyncOp != null && !this.asyncOp.get_isDone()) { return; } FlowNode_GameObject.ActivateOutputLinks((Component)self, 10); GameUtility.FadeIn(0.5f); self.mDesirdSceneSet = false; if (!self.mIgnorePopups && !self.mNewsShown && !GlobalVars.IsTitleStart.Get() && (MonoSingleton <GameManager> .Instance.Player.IsFirstLogin || GameUtility.isLoginInfoDisplay())) { self.mNewsShown = true; GlobalVars.IsTitleStart.Set(true); self.mStateMachine.GotoState <HomeWindow.State_LoginBonus>(); } else { self.NotifyNewFriendRequests(); if (HomeWindow.EnterHomeCount == 0) { self.CheckTrophies(); } if (!self.mNewsShown && !GlobalVars.IsTitleStart.Get() && (MonoSingleton <GameManager> .Instance.Player.IsFirstLogin || self.DebugLoginBonus)) { self.mNewsShown = true; Json_LoginBonus recentLoginBonus = MonoSingleton <GameManager> .Instance.Player.RecentLoginBonus; if (recentLoginBonus != null) { string iname; int num; if (recentLoginBonus.coin > 0) { iname = "$COIN"; num = recentLoginBonus.coin; } else { iname = recentLoginBonus.iname; num = recentLoginBonus.num; } ItemData data = new ItemData(); if (data.Setup(0L, iname, num)) { NotifyList.PushLoginBonus(data); } } self.NotifySupportResult(); } self.mStateMachine.GotoState <HomeWindow.State_Default>(); } if (self.mDesiredSceneIsHome) { self.UnlockContents(); self.FgGIDLoginCheck(); FlowNode_GameObject.ActivateOutputLinks((Component)self, 15); } else { FlowNode_GameObject.ActivateOutputLinks((Component)self, 16); } } if (this.state != 101) { return; } DebugUtility.LogWarning("TUTORIAL: HERE"); FlowNode_GameObject.ActivateOutputLinks((Component)self, 16); FlowNode_GameObject.ActivateOutputLinks((Component)self, 10); GameUtility.FadeIn(0.5f); self.mDesirdSceneSet = false; self.mStateMachine.GotoState <HomeWindow.State_Tutorial>(); }