private void RefreshButtons(QuestDifficulties difficulty) { if (UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnNormal) || UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnElite) || UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnExtra)) { return; } switch (difficulty) { case QuestDifficulties.Normal: this.BtnNormal.SetActive(true); this.BtnUnitRanking.SetActive(true); this.BtnEliteBookmark.SetActive(true); this.BtnElite.SetActive(false); this.BtnExtra.SetActive(false); break; case QuestDifficulties.Elite: this.BtnUnitRanking.SetActive(true); this.BtnEliteBookmark.SetActive(true); this.BtnNormal.SetActive(false); this.BtnElite.SetActive(true); this.BtnExtra.SetActive(false); break; case QuestDifficulties.Extra: this.BtnUnitRanking.SetActive(true); this.BtnEliteBookmark.SetActive(true); this.BtnNormal.SetActive(false); this.BtnElite.SetActive(false); this.BtnExtra.SetActive(true); break; } }
private void RefreshButtons(QuestDifficulties difficulty) { if (Object.op_Equality((Object)null, (Object)this.BtnNormal) || Object.op_Equality((Object)null, (Object)this.BtnElite)) { return; } switch (difficulty) { case QuestDifficulties.Normal: Button componentInChildren = (Button)this.BtnNormal.GetComponentInChildren <Button>(); ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(true); if (!((Behaviour)componentInChildren).get_enabled()) { M0 component = this.BtnNormal.GetComponent <Image>(); ColorBlock colors = ((Selectable)componentInChildren).get_colors(); // ISSUE: explicit reference operation Color disabledColor = ((ColorBlock)@colors).get_disabledColor(); ((Graphic)component).set_color(disabledColor); ((Behaviour)this.BtnNormal.GetComponentInChildren <Button>()).set_enabled(true); } ((Selectable)this.BtnElite.GetComponentInChildren <Button>()).set_interactable(false); break; case QuestDifficulties.Elite: ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(false); ((Selectable)this.BtnElite.GetComponentInChildren <Button>()).set_interactable(true); break; } }
public int CountQuests(QuestDifficulties difficulty) { int num = 0; for (int index = 0; index < this.mQuests.Count; ++index) { if (this.mQuests[index].difficulty == difficulty) { ++num; } } return(num); }
private void RefreshButtons(QuestDifficulties difficulty) { if (UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnNormal) || UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnElite) || UnityEngine.Object.op_Equality((UnityEngine.Object)null, (UnityEngine.Object) this.BtnExtra)) { return; } this.BtnNormal.SetActive(true); this.BtnElite.SetActive(true); switch (difficulty) { case QuestDifficulties.Normal: this.BtnUnitRanking.SetActive(true); this.BtnEliteBookmark.SetActive(false); ((Selectable)this.BtnNormal.GetComponent <Button>()).set_interactable(false); ((Behaviour)this.BtnNormal.GetComponent <Button>()).set_enabled(false); M0 component1 = this.BtnNormal.GetComponent <Image>(); ColorBlock colors1 = ((Selectable)this.BtnNormal.GetComponent <Button>()).get_colors(); // ISSUE: explicit reference operation Color normalColor1 = ((ColorBlock)@colors1).get_normalColor(); ((Graphic)component1).set_color(normalColor1); ((Selectable)this.BtnElite.GetComponent <Button>()).set_interactable(true); ((Behaviour)this.BtnElite.GetComponent <Button>()).set_enabled(true); M0 component2 = this.BtnElite.GetComponent <Image>(); ColorBlock colors2 = ((Selectable)this.BtnElite.GetComponent <Button>()).get_colors(); // ISSUE: explicit reference operation Color pressedColor1 = ((ColorBlock)@colors2).get_pressedColor(); ((Graphic)component2).set_color(pressedColor1); break; case QuestDifficulties.Elite: this.BtnUnitRanking.SetActive(false); this.BtnEliteBookmark.SetActive(true); ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(true); ((Behaviour)this.BtnNormal.GetComponentInChildren <Button>()).set_enabled(true); M0 component3 = this.BtnNormal.GetComponent <Image>(); ColorBlock colors3 = ((Selectable)this.BtnNormal.GetComponent <Button>()).get_colors(); // ISSUE: explicit reference operation Color pressedColor2 = ((ColorBlock)@colors3).get_pressedColor(); ((Graphic)component3).set_color(pressedColor2); ((Selectable)this.BtnElite.GetComponentInChildren <Button>()).set_interactable(false); ((Behaviour)this.BtnElite.GetComponentInChildren <Button>()).set_enabled(false); M0 component4 = this.BtnElite.GetComponent <Image>(); ColorBlock colors4 = ((Selectable)this.BtnElite.GetComponent <Button>()).get_colors(); // ISSUE: explicit reference operation Color normalColor2 = ((ColorBlock)@colors4).get_normalColor(); ((Graphic)component4).set_color(normalColor2); break; } }
public bool Deserialize(JSON_QuestCampaignChildParam json) { this.iname = json.iname; this.scope = (QuestCampaignScopes)json.scope; this.questType = (QuestTypes)json.quest_type; this.questMode = (QuestDifficulties)json.quest_mode; this.questId = json.quest_id; this.unit = json.unit; this.dropRate = json.drop_rate; this.dropNum = json.drop_num; this.expPlayer = json.exp_player; this.expUnit = json.exp_unit; this.apRate = json.ap_rate; this.parents = new QuestCampaignParentParam[0]; return(true); }
public void Refresh(QuestDifficulties difficulty) { this.RefreshQuests(); if (difficulty == QuestDifficulties.Elite && this.CountQuests(QuestDifficulties.Elite) <= 0) { difficulty = QuestDifficulties.Normal; } this.mDifficultyFilter = difficulty; GlobalVars.QuestDifficulty = difficulty; this.isTriggeredRefresh = true; this.RefreshItems(); if (Object.op_Inequality((Object)this.ScrollRect, (Object)null)) { this.ScrollRect.set_normalizedPosition(Vector2.get_one()); if (HomeWindow.GetRestorePoint() == RestorePoints.QuestList && !string.IsNullOrEmpty(GlobalVars.LastPlayedQuest.Get()) && ((QuestStates)GlobalVars.LastQuestState == QuestStates.Cleared && QuestListV2.mScrollPosCache.ContainsKey(this.ListID))) { this.mSetScrollPos = 2; this.mNewScrollPos = QuestListV2.mScrollPosCache[this.ListID]; QuestListV2.mScrollPosCache.Remove(this.ListID); HomeWindow.SetRestorePoint(RestorePoints.Home); } } this.RefreshButtons(difficulty); if (Object.op_Inequality((Object)this.BtnElite, (Object)null)) { this.BtnElite.SetActive(true); } if (!Object.op_Inequality((Object)this.BtnNormal, (Object)null)) { return; } this.BtnNormal.SetActive(true); if (this.mQuests.Count <= 0 || this.CountQuests(QuestDifficulties.Elite) > 0) { return; } ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(false); ((Behaviour)this.BtnNormal.GetComponentInChildren <Button>()).set_enabled(false); M0 componentInChildren = this.BtnNormal.GetComponentInChildren <Image>(); ColorBlock colors = ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).get_colors(); // ISSUE: explicit reference operation Color normalColor = ((ColorBlock)@colors).get_normalColor(); ((Graphic)componentInChildren).set_color(normalColor); }
private void RefreshButtons(QuestDifficulties difficulty) { if (Object.op_Equality((Object)null, (Object)this.BtnNormal) || Object.op_Equality((Object)null, (Object)this.BtnElite)) { return; } switch (difficulty) { case QuestDifficulties.Normal: ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(true); ((Selectable)this.BtnElite.GetComponentInChildren <Button>()).set_interactable(false); break; case QuestDifficulties.Elite: ((Selectable)this.BtnNormal.GetComponentInChildren <Button>()).set_interactable(false); ((Selectable)this.BtnElite.GetComponentInChildren <Button>()).set_interactable(true); break; } }
private bool Refresh(QuestDifficulties difficulty) { if (GlobalVars.RankingQuestSelected) { GlobalVars.RankingQuestSelected = false; this.mIsQuestsRefreshed = true; if (!this.RefreshRankingQuests()) { return(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BackButton, (UnityEngine.Object)null)) { this.BackButton.SetActive(false); } } else { if (!this.RefreshQuests()) { return(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BackButton, (UnityEngine.Object)null)) { this.BackButton.SetActive(true); } } if (difficulty == QuestDifficulties.Normal && !this.ExistsQuest(QuestDifficulties.Normal)) { difficulty = QuestDifficulties.Elite; } if (difficulty == QuestDifficulties.Elite && !this.ExistsQuest(QuestDifficulties.Elite)) { difficulty = QuestDifficulties.Extra; } if (difficulty == QuestDifficulties.Extra && !this.ExistsQuest(QuestDifficulties.Extra)) { difficulty = QuestDifficulties.Normal; } this.mDifficultyFilter = difficulty; this.RefreshItems(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ScrollRect, (UnityEngine.Object)null)) { this.ScrollRect.set_normalizedPosition(Vector2.get_one()); if (HomeWindow.GetRestorePoint() == RestorePoints.QuestList && !string.IsNullOrEmpty(GlobalVars.LastPlayedQuest.Get()) && ((QuestStates)GlobalVars.LastQuestState == QuestStates.Cleared && QuestListV2.mScrollPosCache.ContainsKey(this.ListID))) { this.mSetScrollPos = 2; this.mNewScrollPos = QuestListV2.mScrollPosCache[this.ListID]; QuestListV2.mScrollPosCache.Remove(this.ListID); HomeWindow.SetRestorePoint(RestorePoints.Home); } } this.RefreshButtons(difficulty); switch (difficulty) { case QuestDifficulties.Normal: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnNormal, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Elite) && !this.ExistsQuest(QuestDifficulties.Extra)) { this.BtnNormal.SetActive(false); break; } break; case QuestDifficulties.Elite: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnElite, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Extra) && !this.ExistsQuest(QuestDifficulties.Normal)) { this.BtnElite.SetActive(false); break; } break; default: if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnExtra, (UnityEngine.Object)null) && !this.ExistsQuest(QuestDifficulties.Normal) && !this.ExistsQuest(QuestDifficulties.Elite)) { this.BtnExtra.SetActive(false); break; } break; } return(true); }
public bool ExistsQuest(QuestDifficulties difficulty) { return(this.mQuests.Any <QuestParam>((Func <QuestParam, bool>)(q => q.difficulty == difficulty))); }