public void UpdateCollectionCards(List <Actor> actorList, CollectionManagerDisplay.ViewMode mode, bool isMassDisenchanting) { int index = 0; while (index < actorList.Count) { if (index >= GetMaxNumCards()) { break; } Actor actor = actorList[index]; CollectionCardVisual collectionCardVisual = this.GetCollectionCardVisual(index); collectionCardVisual.SetActor(actor, mode); collectionCardVisual.Show(); if (mode == CollectionManagerDisplay.ViewMode.HERO_SKINS) { collectionCardVisual.SetHeroSkinBoxCollider(); } else { collectionCardVisual.SetDefaultBoxCollider(); } index++; } for (int i = index; i < this.m_collectionCardVisuals.Count; i++) { CollectionCardVisual visual2 = this.GetCollectionCardVisual(i); visual2.SetActor(null, CollectionManagerDisplay.ViewMode.CARDS); visual2.Hide(); } this.UpdateFavoriteCardBack(mode); this.UpdateFavoriteHeroSkins(mode, isMassDisenchanting); this.UpdateHeroSkinNames(mode); this.UpdateCurrentPageCardLocks(false); }
public bool ChangeActor(Actor actor, CollectionManagerDisplay.ViewMode vtype) { if (!this.m_actorCacheInit) { this.m_actorCacheInit = true; this.m_actorCache.AddActorLoadedListener(new HandActorCache.ActorLoadedCallback(this.OnCardActorLoaded)); this.m_actorCache.Initialize(); } if (!this.m_actorCache.IsInitializing()) { this.m_visualType = vtype; if (this.m_visualType != CollectionManagerDisplay.ViewMode.CARD_BACKS) { EntityDef entityDef = actor.GetEntityDef(); CardFlair cardFlair = actor.GetCardFlair(); bool flag = entityDef != this.m_entityDef; bool flag2 = !cardFlair.Equals(this.m_cardFlair); if (flag || flag2) { this.m_entityDef = entityDef; this.m_cardFlair = cardFlair; this.m_cardActor = this.m_actorCache.GetActor(entityDef, cardFlair); if (this.m_cardActor == null) { return(false); } if (flag) { CollectionCardCache.Get().LoadCardDef(this.m_entityDef.GetCardId(), new CollectionCardCache.LoadCardDefCallback(this.OnCardDefLoaded), new CardPortraitQuality(1, this.m_cardFlair.Premium), null); } else { this.InitDeckTileActor(); this.InitCardActor(); } } return(true); } if (actor != null) { this.m_entityDef = null; this.m_cardFlair = null; this.m_currentCardBack = actor.GetComponentInChildren <CardBack>(); this.m_cardActor = this.m_cardBackActor; this.m_cardBackActor.SetCardbackUpdateIgnore(true); return(true); } } return(false); }
public void SetActor(Actor actor, CollectionManagerDisplay.ViewMode type = 0) { if ((this.m_actor != null) && (this.m_actor.transform.parent == base.transform)) { this.m_actor.Hide(); } this.m_visualType = type; this.m_actor = actor; this.UpdateCardCount(); if (this.m_actor != null) { GameUtils.SetParent((Component)actor, (Component)this, false); ActorStateType activeStateType = this.m_actor.GetActorStateMgr().GetActiveStateType(); this.ShowNewItemCallout(activeStateType == ActorStateType.CARD_RECENTLY_ACQUIRED); } }
public void UpdateHeroSkinNames(CollectionManagerDisplay.ViewMode mode) { if ((UniversalInputManager.UsePhoneUI != null) && (mode == CollectionManagerDisplay.ViewMode.HERO_SKINS)) { foreach (CollectionCardVisual visual in this.m_collectionCardVisuals) { if (visual.IsShown()) { CollectionHeroSkin component = visual.GetActor().GetComponent <CollectionHeroSkin>(); if (component != null) { component.ShowCollectionManagerText(); } } } } }
public void SetMode(CollectionManagerDisplay.ViewMode mode, TAG_CLASS?classTag) { if (mode == CollectionManagerDisplay.ViewMode.CARD_BACKS) { this.m_headerText.Text = GameStrings.Get("GLUE_COLLECTION_MANAGER_CARD_BACKS_TITLE"); } else if (mode == CollectionManagerDisplay.ViewMode.HERO_SKINS) { this.m_headerText.Text = GameStrings.Get("GLUE_COLLECTION_MANAGER_HERO_SKINS_TITLE"); } else if (classTag.HasValue) { this.m_headerText.Text = GameStrings.GetClassName(classTag.Value); } else { this.m_headerText.Text = string.Empty; } }
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); } } } } } }
public void UpdateFavoriteCardBack(CollectionManagerDisplay.ViewMode mode) { if (mode == CollectionManagerDisplay.ViewMode.CARD_BACKS) { int defaultCardBack = -1; if (!CollectionManager.Get().IsInEditMode()) { defaultCardBack = NetCache.Get().GetNetObject <NetCache.NetCacheCardBacks>().DefaultCardBack; } foreach (CollectionCardVisual visual in this.m_collectionCardVisuals) { if (visual.IsShown()) { CollectionCardBack component = visual.GetActor().GetComponent <CollectionCardBack>(); if (component != null) { component.ShowFavoriteBanner(defaultCardBack == component.GetCardBackId()); } } } } }
private void EnterCraftingMode() { CollectionManagerDisplay.ViewMode viewMode = CollectionManagerDisplay.Get().GetViewMode(); if (this.m_visualType == viewMode) { switch (viewMode) { case CollectionManagerDisplay.ViewMode.CARDS: if (CraftingManager.Get() != null) { CraftingManager.Get().EnterCraftMode(this); } break; case CollectionManagerDisplay.ViewMode.HERO_SKINS: { HeroSkinInfoManager manager2 = HeroSkinInfoManager.Get(); if (manager2 != null) { manager2.EnterPreview(this); } break; } case CollectionManagerDisplay.ViewMode.CARD_BACKS: { CardBackInfoManager manager3 = CardBackInfoManager.Get(); if (manager3 != null) { manager3.EnterPreview(this); } break; } } CollectionDeckTray.Get().CancelRenamingDeck(); } }
public void UpdateFavoriteHeroSkins(CollectionManagerDisplay.ViewMode mode, bool isMassDisenchanting) { object[] objArray1 = new object[] { mode, isMassDisenchanting }; base.method_8("UpdateFavoriteHeroSkins", objArray1); }
public void UpdateFavoriteCardBack(CollectionManagerDisplay.ViewMode mode) { object[] objArray1 = new object[] { mode }; base.method_8("UpdateFavoriteCardBack", objArray1); }
public void ShowDeck(CollectionManagerDisplay.ViewMode viewMode, long deckID, bool isNewDeck) { object[] objArray1 = new object[] { viewMode, deckID, isNewDeck }; base.method_8("ShowDeck", objArray1); }
public void OnCMViewModeChanged(CollectionManagerDisplay.ViewMode prevMode, CollectionManagerDisplay.ViewMode mode, CollectionManagerDisplay.ViewModeData userdata) { object[] objArray1 = new object[] { prevMode, mode, userdata }; base.method_8("OnCMViewModeChanged", objArray1); }
public DeckContentTypes GetContentTypeFromViewMode(CollectionManagerDisplay.ViewMode viewMode) { object[] objArray1 = new object[] { viewMode }; return(base.method_11 <DeckContentTypes>("GetContentTypeFromViewMode", objArray1)); }
public Variables GetVariables(CollectionManagerDisplay.ViewMode mode) {
public void UpdateHeroSkinNames(CollectionManagerDisplay.ViewMode mode) { object[] objArray1 = new object[] { mode }; base.method_8("UpdateHeroSkinNames", objArray1); }
public static int GetMaxCardsPerPage(CollectionManagerDisplay.ViewMode viewMode) { Class272.Enum20[] enumArray1 = new Class272.Enum20[] { Class272.Enum20.ValueType }; object[] objArray1 = new object[] { viewMode }; return(MonoClass.smethod_11 <int>(TritonHs.MainAssemblyPath, "", "CollectionPageDisplay", "GetMaxCardsPerPage", enumArray1, objArray1)); }
public bool ChangeActor(Actor actor, CollectionManagerDisplay.ViewMode vtype) { object[] objArray1 = new object[] { actor, vtype }; return(base.method_11 <bool>("ChangeActor", objArray1)); }
public void SetActor(Actor actor, CollectionManagerDisplay.ViewMode type) { object[] objArray1 = new object[] { actor, type }; base.method_8("SetActor", objArray1); }
public Variables GetVariables(CollectionManagerDisplay.ViewMode mode) { object[] objArray1 = new object[] { mode }; return(base.method_14 <Variables>("GetVariables", objArray1)); }