private void Refresh() { QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(((Component)this).get_gameObject(), (QuestParam)null); if (dataOfClass == null) { return; } if (!dataOfClass.HasMission()) { GameUtility.SetGameObjectActive(this.m_NoMissionText, true); } else { this.CreateItems(dataOfClass); this.SortItems(); } }
private void Start() { QuestParam questParam = (QuestParam)null; SceneBattle instance = SceneBattle.Instance; if (Object.op_Inequality((Object)instance, (Object)null)) { questParam = instance.CurrentQuest; instance.OnQuestEnd += new SceneBattle.QuestEndEvent(this.OnQuestEnd); if (questParam != null && questParam.CheckAllowedAutoBattle()) { if (Object.op_Inequality((Object)this.AutoPlayOn, (Object)null)) { ((Component)this.AutoPlayOn).get_gameObject().SetActive(!instance.Battle.RequestAutoBattle); // ISSUE: method pointer ((UnityEvent)this.AutoPlayOn.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(TurnOnAutoPlay))); } if (Object.op_Inequality((Object)this.AutoPlayOff, (Object)null)) { ((Component)this.AutoPlayOff).get_gameObject().SetActive(instance.Battle.RequestAutoBattle); // ISSUE: method pointer ((UnityEvent)this.AutoPlayOff.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(TurnOffAutoPlay))); } if (Object.op_Inequality((Object)this.AutoPlay, (Object)null)) { ((Component)this.AutoPlay).get_gameObject().SetActive(true); GameUtility.SetToggle(this.AutoPlay, instance.Battle.RequestAutoBattle); // ISSUE: method pointer ((UnityEvent <bool>) this.AutoPlay.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(\u003CStart\u003Em__123))); } if (Object.op_Inequality((Object)this.AutoMode_Parent, (Object)null)) { this.AutoMode_Parent.get_gameObject().SetActive(instance.Battle.RequestAutoBattle); } if (Object.op_Inequality((Object)this.AutoMode_Treasure, (Object)null)) { this.AutoMode_Treasure.SetActive(GameUtility.Config_AutoMode_Treasure.Value); } if (Object.op_Inequality((Object)this.AutoMode_Skill, (Object)null)) { this.AutoMode_Skill.SetActive(GameUtility.Config_AutoMode_DisableSkill.Value); } } else { if (Object.op_Inequality((Object)this.AutoPlayOn, (Object)null)) { ((Component)this.AutoPlayOn).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.AutoPlayOff, (Object)null)) { ((Component)this.AutoPlayOff).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.AutoPlay, (Object)null)) { ((Component)this.AutoPlay).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.AutoMode_Parent, (Object)null)) { this.AutoMode_Parent.SetActive(false); } if (Object.op_Inequality((Object)this.AutoMode_Treasure, (Object)null)) { this.AutoMode_Treasure.SetActive(false); } if (Object.op_Inequality((Object)this.AutoMode_Skill, (Object)null)) { this.AutoMode_Skill.SetActive(false); } } } if (Object.op_Inequality((Object)this.DebugButton, (Object)null)) { this.DebugButton.SetActive(false); } if (Object.op_Inequality((Object)this.MissionButton, (Object)null) && questParam != null) { bool flag = questParam.HasMission(); if (Object.op_Implicit((Object)instance) && instance.Battle != null && (instance.Battle.IsOrdeal && questParam.state != QuestStates.Cleared)) { flag = false; } if (this.HideMissionButton) { this.MissionButton.SetActive(flag); } else { Selectable component = (Selectable)this.MissionButton.GetComponent <Selectable>(); if (Object.op_Inequality((Object)component, (Object)null)) { component.set_interactable(flag); } } } if (!Object.op_Inequality((Object)this.ExitButton, (Object)null)) { return; } bool flag1 = questParam != null && questParam.CheckAllowedRetreat(); this.ExitButton.SetActive(flag1); if (!flag1 || !Object.op_Inequality((Object)instance, (Object)null) || !instance.IsPlayingArenaQuest) { return; } ((Text)this.ExitButton.GetComponentInChildren <LText>(true)).set_text(LocalizedText.Get("sys.BTN_RETIRE_ARENA")); if (!instance.Battle.IsArenaSkip) { return; } Button component1 = (Button)this.ExitButton.GetComponent <Button>(); if (!Object.op_Implicit((Object)component1)) { return; } ((Selectable)component1).set_interactable(false); }
private bool Test() { PlayerData player = MonoSingleton <GameManager> .Instance.Player; switch (this.Condition) { case FlowNode_Condition.Conditions.QUEST_HASENOUGHSTAMINA: QuestParam quest1 = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); if (quest1 != null) { return(MonoSingleton <GameManager> .Instance.Player.Stamina >= quest1.RequiredApWithPlayerLv(player.Lv, true)); } break; case FlowNode_Condition.Conditions.FRIEND_ISFRIEND: SupportData supportData1; if ((supportData1 = this.GetSupportData()) != null) { return(supportData1.IsFriend()); } return(false); case FlowNode_Condition.Conditions.PARTY_LEADERSKILLAVAIL: PartyData dataOfClass1; if ((dataOfClass1 = DataSource.FindDataOfClass <PartyData>(((Component)this).get_gameObject(), (PartyData)null)) != null) { return(this.GetLeaderSkill(dataOfClass1) != null); } break; case FlowNode_Condition.Conditions.FRIEND_LEADERSKILLAVAIL: SupportData supportData2; if ((supportData2 = this.GetSupportData()) != null) { return(supportData2.LeaderSkill != null); } break; case FlowNode_Condition.Conditions.PARTY_LEADEREXIST: for (int index = 0; index < player.Partys.Count; ++index) { if (player.Partys[index].GetUnitUniqueID(player.Partys[index].LeaderIndex) == 0L) { return(false); } } return(true); case FlowNode_Condition.Conditions.TARGET_COMMANDVALID: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.UIParam_TargetValid); } break; case FlowNode_Condition.Conditions.QUEST_DROPSKAKERA: QuestParam dataOfClass2; if ((dataOfClass2 = DataSource.FindDataOfClass <QuestParam>(((Component)this).get_gameObject(), (QuestParam)null)) != null && !UnityEngine.Object.op_Equality((UnityEngine.Object)QuestDropParam.Instance, (UnityEngine.Object)null)) { return(QuestDropParam.Instance.GetHardDropPiece(dataOfClass2.iname, GlobalVars.GetDropTableGeneratedDateTime()) != null); } break; case FlowNode_Condition.Conditions.QUEST_FIRSTTURN: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.UnitStartCount <= 1); } break; case FlowNode_Condition.Conditions.QUEST_NEEDFRIENDREQUEST: SupportData support = (SupportData)GlobalVars.SelectedSupport; if (support == null || support.IsFriend()) { return(false); } FriendData friendData = player.Friends.Find((Predicate <FriendData>)(f => f.FUID == support.FUID)); if (friendData == null) { return(true); } return(friendData.State == FriendStates.Friend || friendData.State != FriendStates.Follow ? false : false); case FlowNode_Condition.Conditions.PLAYER_LEVELCHANGED: return((bool)GlobalVars.PlayerLevelChanged); case FlowNode_Condition.Conditions.NEWGAME: return(GameUtility.Config_NewGame.Value); case FlowNode_Condition.Conditions.BTLIDSET: return((long)GlobalVars.BtlID != 0L); case FlowNode_Condition.Conditions.QUEST_ISMULTIPLAY: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsPlayingMultiQuest); } break; case FlowNode_Condition.Conditions.QUEST_ISARENA: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsPlayingArenaQuest); } break; case FlowNode_Condition.Conditions.ARENA_RANKUP: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsArenaRankupInfo()); } break; case FlowNode_Condition.Conditions.QUEST_HASREWARD: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(!SceneBattle.Instance.Battle.GetQuestRecord().IsZero); } break; case FlowNode_Condition.Conditions.TERMSOFUSE_AGREED: return(MonoSingleton <GameManager> .Instance.IsAgreeTermsOfUse()); case FlowNode_Condition.Conditions.FRIEND_VALID: return(this.GetSupportData() != null); case FlowNode_Condition.Conditions.QUEST_ENDSILENT: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.CurrentQuest.Silent); } break; case FlowNode_Condition.Conditions.IS_NOT_ENOUGH_SUPPORT_COST: SupportData supportData3 = this.GetSupportData(); if (supportData3 != null) { int gold = player.Gold; if (supportData3.GetCost() > gold) { return(true); } break; } break; case FlowNode_Condition.Conditions.MULTI_PLAY_IS_UNLOCKED: return(MonoSingleton <GameManager> .Instance.Player.CheckUnlock(UnlockTargets.MultiPlay)); case FlowNode_Condition.Conditions.QUEST_IS_ENABLE_AUTOBATTLE: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { QuestParam quest2 = SceneBattle.Instance.Battle.GetQuest(); if (quest2 != null) { return(quest2.CheckAllowedAutoBattle()); } return(false); } break; case FlowNode_Condition.Conditions.QUEST_IS_AUTOBATTLE: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.Battle.IsAutoBattle); } break; case FlowNode_Condition.Conditions.DEBUGBUILD: return(GameUtility.IsDebugBuild); case FlowNode_Condition.Conditions.IS_BEGINNER: return(MonoSingleton <GameManager> .Instance.Player.IsBeginner()); case FlowNode_Condition.Conditions.IS_END_TUTORIAL: return((MonoSingleton <GameManager> .Instance.Player.TutorialFlags & 1L) != 0L); case FlowNode_Condition.Conditions.IS_GET_UNIT: return(MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUnitID(DataSource.FindDataOfClass <UnitParam>(((Component)this).get_gameObject(), (UnitParam)null).iname) != null); case FlowNode_Condition.Conditions.VERSUS_UNLOCK: return(MonoSingleton <GameManager> .Instance.Player.CheckUnlock(UnlockTargets.MultiVS)); case FlowNode_Condition.Conditions.QUEST_IS_SHOW_REVIEW: if (!string.IsNullOrEmpty(GlobalVars.SelectedQuestID)) { QuestParam quest2 = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); if (quest2 != null) { return(quest2.ShowReviewPopup); } break; } break; case FlowNode_Condition.Conditions.QUEST_IS_FIRST_CLEAR: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsFirstWin); } break; case FlowNode_Condition.Conditions.QUEST_IS_GPS: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null) && SceneBattle.Instance.CurrentQuest != null && SceneBattle.Instance.CurrentQuest.type == QuestTypes.Gps) { return(true); } break; case FlowNode_Condition.Conditions.QUEST_IS_GPSCHAPTER_HEAD: if (!string.IsNullOrEmpty((string)GlobalVars.SelectedChapter)) { ChapterParam area = MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedChapter); if (area != null && area.IsGpsQuest()) { return(area.children.Count > 0); } break; } break; case FlowNode_Condition.Conditions.QUEST_IS_GPSCHAPTER_QUEST: if (!string.IsNullOrEmpty((string)GlobalVars.SelectedChapter)) { ChapterParam area = MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedChapter); if (area != null) { return(area.IsGpsQuest()); } break; } break; case FlowNode_Condition.Conditions.QUEST_IS_GPSCHAPTER_QUEST_VALID: if (!string.IsNullOrEmpty((string)GlobalVars.SelectedChapter)) { ChapterParam area = MonoSingleton <GameManager> .Instance.FindArea((string)GlobalVars.SelectedChapter); if (area != null) { return(area.HasGpsQuest()); } break; } break; case FlowNode_Condition.Conditions.VALID_GPSGIFT: return(MonoSingleton <GameManager> .Instance.Player.ValidGpsGift); case FlowNode_Condition.Conditions.SCENE_CHANGING: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)HomeWindow.Current, (UnityEngine.Object)null)) { return(HomeWindow.Current.IsSceneChanging); } return(false); case FlowNode_Condition.Conditions.QUEST_IS_PLAY_LAST_DEMO: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsPlayLastDemo); } break; case FlowNode_Condition.Conditions.QUEST_IS_RANKINGQUEST: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.Battle.IsRankingQuest); } break; case FlowNode_Condition.Conditions.QUEST_IS_RANKINGQUEST_NEWSCORE: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsRankingQuestNewScore); } break; case FlowNode_Condition.Conditions.QUEST_IS_RANKINGQUEST_JOIN_REWARD: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsRankingQuestJoinReward); } break; case FlowNode_Condition.Conditions.QUEST_IS_RANKINGQUEST_RESULT_VALIDRANK: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.ValidateRankingQuestRank); } break; case FlowNode_Condition.Conditions.DIFFERENT_VERSION: string version = MyApplicationPlugin.get_version(); string strB = PlayerPrefsUtility.GetString(PlayerPrefsUtility.AWAKE_VERSION, string.Empty); PlayerPrefsUtility.SetString(PlayerPrefsUtility.AWAKE_VERSION, version, true); return(string.Compare(version, strB) != 0); case FlowNode_Condition.Conditions.SELECTQUEST_IS_MULTIGPS: if (!string.IsNullOrEmpty(GlobalVars.SelectedQuestID)) { QuestParam quest2 = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); if (quest2 != null) { return(quest2.IsMultiAreaQuest); } break; } break; case FlowNode_Condition.Conditions.LINEQUEST_IS_MULTIGPS: if (!string.IsNullOrEmpty(FlowNode_OnUrlSchemeLaunch.LINEParam_Pending.iname)) { QuestParam quest2 = MonoSingleton <GameManager> .Instance.FindQuest(FlowNode_OnUrlSchemeLaunch.LINEParam_Pending.iname); if (quest2 != null) { return(quest2.IsMultiAreaQuest); } break; } break; case FlowNode_Condition.Conditions.GPSQUEST_IS_VALID: return(MonoSingleton <GameManager> .Instance.IsValidAreaQuest()); case FlowNode_Condition.Conditions.MULTI_GPSQUEST_IS_VALID: return(MonoSingleton <GameManager> .Instance.IsValidMultiAreaQuest()); case FlowNode_Condition.Conditions.QUEST_IS_ORDEAL: if (UnityEngine.Object.op_Implicit((UnityEngine.Object)SceneBattle.Instance)) { return(SceneBattle.Instance.IsOrdealQuest); } break; case FlowNode_Condition.Conditions.QUEST_IS_GET_UNIT: if (UnityEngine.Object.op_Implicit((UnityEngine.Object)SceneBattle.Instance)) { return(SceneBattle.Instance.IsGetFirstClearItem); } break; case FlowNode_Condition.Conditions.VALID_FIRST_CHARGE_CAMPAIGN: if ((byte)MonoSingleton <GameManager> .Instance.Player.FirstChargeStatus != (byte)1) { return((byte)MonoSingleton <GameManager> .Instance.Player.FirstChargeStatus == (byte)2); } return(true); case FlowNode_Condition.Conditions.GUERRILLASHOP_IS_STARTED: return(MonoSingleton <GameManager> .Instance.Player.IsGuerrillaShopStarted); case FlowNode_Condition.Conditions.QUEST_END_CARD_IS_SENDMAIL: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)SceneBattle.Instance, (UnityEngine.Object)null)) { return(SceneBattle.Instance.IsCardSendMail); } break; case FlowNode_Condition.Conditions.TOWER_QUEST_HAVE_MISSION: QuestParam quest3 = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); if (quest3 != null && quest3.HasMission()) { return(true); } break; case FlowNode_Condition.Conditions.SHOW_BEGINNER_TOP_NOTIFY: if (player.IsBeginner() && PlayerPrefsUtility.GetInt(PlayerPrefsUtility.BEGINNER_TOP_HAS_VISITED, 0) == 0) { return(true); } break; } return(false); }