public void Show(FollowerDetailView followerDetailView) { base.gameObject.SetActive(true); this.m_followerDetailView = followerDetailView; if (GarrisonStatus.Gold() >= 250) { this.m_okButton.interactable = true; } else { this.m_okButtonLabel.text = StaticDB.GetString("CANT_AFFORD", null); this.m_okButton.interactable = false; } this.m_activationsRemainingText.text = GarrisonStatus.GetRemainingFollowerActivations().ToString(); this.m_activationCostText.text = GarrisonStatus.GetFollowerActivationGoldCost().ToString(); }
private void UpdateChampionButtons(WrapperGarrisonFollower follower) { if (this.m_activateChampionButton == null || this.m_deactivateChampionButton == null) { return; } if ((follower.Flags & 8) == 0) { bool flags = (follower.Flags & 4) != 0; bool remainingFollowerActivations = GarrisonStatus.GetRemainingFollowerActivations() > 0; this.m_activateChampionButton.SetActive((!flags ? false : remainingFollowerActivations)); int numActiveChampions = GeneralHelpers.GetNumActiveChampions(); int maxActiveFollowers = GarrisonStatus.GetMaxActiveFollowers(); bool currentMissionID = follower.CurrentMissionID != 0; this.m_deactivateChampionButton.SetActive((flags || currentMissionID ? false : numActiveChampions > maxActiveFollowers)); } else { this.m_activateChampionButton.SetActive(false); this.m_deactivateChampionButton.SetActive(false); } }
private void UpdateChampionButtons(WrapperGarrisonFollower follower) { if (this.m_activateChampionButton == null || this.m_deactivateChampionButton == null) { return; } bool flag = (follower.Flags & 8) != 0; if (flag) { this.m_activateChampionButton.SetActive(false); this.m_deactivateChampionButton.SetActive(false); } else { bool flag2 = (follower.Flags & 4) != 0; bool flag3 = GarrisonStatus.GetRemainingFollowerActivations() > 0; this.m_activateChampionButton.SetActive(flag2 && flag3); int numActiveChampions = GeneralHelpers.GetNumActiveChampions(); int maxActiveFollowers = GarrisonStatus.GetMaxActiveFollowers(); bool flag4 = follower.CurrentMissionID != 0; this.m_deactivateChampionButton.SetActive(!flag2 && !flag4 && numActiveChampions > maxActiveFollowers); } }