public void UpdateVisual(bool isOverDeck) { Actor activeActor = this.m_activeActor; SpellType nONE = SpellType.NONE; if (this.m_visualType == CollectionManagerDisplay.ViewMode.CARDS) { if ((isOverDeck && (this.m_entityDef != null)) && !this.m_entityDef.IsHero()) { this.m_activeActor = this.m_deckTile; nONE = SpellType.SUMMON_IN; } else { this.m_activeActor = this.m_cardActor; nONE = SpellType.DEATHREVERSE; } } else { this.m_activeActor = this.m_cardActor; nONE = SpellType.DEATHREVERSE; } if (activeActor != this.m_activeActor) { if (activeActor != null) { activeActor.Hide(); activeActor.gameObject.SetActive(false); } if (this.m_activeActor != null) { this.m_activeActor.gameObject.SetActive(true); this.m_activeActor.Show(); if ((this.m_visualType == CollectionManagerDisplay.ViewMode.CARD_BACKS) && (this.m_currentCardBack != null)) { CardBackManager.Get().UpdateCardBack(this.m_activeActor, this.m_currentCardBack); } Spell spell = this.m_activeActor.GetSpell(nONE); if (spell != null) { spell.ActivateState(SpellStateType.BIRTH); } if ((this.m_entityDef != null) && this.m_entityDef.IsHero()) { CollectionHeroSkin component = this.m_activeActor.gameObject.GetComponent <CollectionHeroSkin>(); component.SetClass(this.m_entityDef.GetClass()); component.ShowSocketFX(); } } } }
public void UpdateFavoriteHeroSkins(CollectionManagerDisplay.ViewMode mode, bool isMassDisenchanting) { bool flag = mode == CollectionManagerDisplay.ViewMode.HERO_SKINS; if (this.m_heroSkinsDecor != null) { this.m_heroSkinsDecor.SetActive(flag && !isMassDisenchanting); } if (flag) { bool flag2 = CollectionManager.Get().GetTaggedDeck(CollectionManager.DeckTag.Editing) == null; foreach (CollectionCardVisual visual in this.m_collectionCardVisuals) { if (visual.IsShown()) { Actor actor = visual.GetActor(); CollectionHeroSkin component = actor.GetComponent <CollectionHeroSkin>(); if (component != null) { component.ShowShadow(actor.IsShown()); EntityDef entityDef = actor.GetEntityDef(); if (entityDef != null) { component.SetClass(entityDef.GetClass()); bool show = false; if (flag2) { NetCache.CardDefinition favoriteHero = CollectionManager.Get().GetFavoriteHero(entityDef.GetClass()); if (favoriteHero != null) { show = ((CollectionManager.Get().GetBestHeroesIOwn(entityDef.GetClass()).Count > 1) && !string.IsNullOrEmpty(favoriteHero.Name)) && (favoriteHero.Name == entityDef.GetCardId()); } } component.ShowFavoriteBanner(show); } } } } } }