public void HandleRelease() { CollectionManagerDisplay.Get().HideDeckHelpPopup(); CollectionDeck taggedDeck = CollectionManager.Get().GetTaggedDeck(CollectionManager.DeckTag.Editing); bool flag = taggedDeck != null; if (this.m_buttons == null) { this.m_buttons = this.m_classFilterTray.GetComponentsInChildren <ClassFilterButton>(); } if (!flag) { this.m_container.SetDefaults(); } else { TAG_CLASS classTag = taggedDeck.GetClass(); this.m_container.SetClass(classTag); } this.m_classFilterTray.ToggleTraySlider(true, this.m_showTwoRowsBone, true); }
public void SetDeck(CollectionDeck deck) { if (deck == null) { UnityEngine.Debug.LogWarning(string.Format("CollectionDeckInfo.SetDeckID(): deck is null", new object[0])); } else { this.UpdateManaCurve(deck); string heroPowerCardIdFromHero = GameUtils.GetHeroPowerCardIdFromHero(deck.HeroCardID); if (string.IsNullOrEmpty(heroPowerCardIdFromHero)) { UnityEngine.Debug.LogWarning("CollectionDeckInfo.UpdateInfo(): invalid hero power ID"); this.m_heroPowerID = string.Empty; } else if (!heroPowerCardIdFromHero.Equals(this.m_heroPowerID)) { this.m_heroPowerID = heroPowerCardIdFromHero; string vanillaHeroCardIDFromClass = CollectionManager.Get().GetVanillaHeroCardIDFromClass(deck.GetClass()); CardFlair bestHeroFlairOwned = CollectionManager.Get().GetBestHeroFlairOwned(vanillaHeroCardIDFromClass); DefLoader.Get().LoadFullDef(this.m_heroPowerID, new DefLoader.LoadDefCallback <FullDef>(this.OnHeroPowerFullDefLoaded), (bestHeroFlairOwned == null) ? new CardFlair(TAG_PREMIUM.NORMAL) : bestHeroFlairOwned); } } }