public void UpdateDisplay(FullDef def, CardFlair cardFlair)
 {
     this.m_heroClass = def.GetEntityDef().GetClass();
     this.SetFullDef(def);
     this.SetClassname(GameStrings.GetClassName(this.m_heroClass));
     this.SetClassIcon(this.GetClassIconMaterial(this.m_heroClass));
     this.SetBasicSetProgress(this.m_heroClass);
     this.SetCardFlair(cardFlair);
 }
Exemple #2
0
    private string GetClassName()
    {
        TAG_CLASS tag = this.m_entityDef.GetClass();

        if (tag == TAG_CLASS.INVALID)
        {
            return(GameStrings.Get("GLUE_PACK_OPENING_ALL_CLASSES"));
        }
        return(GameStrings.GetClassName(tag));
    }
Exemple #3
0
    private void InitRewardText()
    {
        CardRewardData data      = base.Data as CardRewardData;
        EntityDef      entityDef = DefLoader.Get().GetEntityDef(data.CardID);

        if (!entityDef.IsHero())
        {
            string       headline  = GameStrings.Get("GLOBAL_REWARD_CARD_HEADLINE");
            string       details   = string.Empty;
            string       source    = string.Empty;
            TAG_CARD_SET cardSet   = entityDef.GetCardSet();
            TAG_CLASS    tag       = entityDef.GetClass();
            string       className = GameStrings.GetClassName(tag);
            if (GameMgr.Get().IsTutorial())
            {
                details = GameUtils.GetCurrentTutorialCardRewardDetails();
            }
            else if (cardSet == TAG_CARD_SET.CORE)
            {
                int num            = 20;
                int basicCardsIOwn = CollectionManager.Get().GetBasicCardsIOwn(tag);
                if (data.Premium == TAG_PREMIUM.GOLDEN)
                {
                    details = string.Empty;
                }
                else
                {
                    if (num == basicCardsIOwn)
                    {
                        data.InnKeeperLine = CardRewardData.InnKeeperTrigger.CORE_CLASS_SET_COMPLETE;
                    }
                    else if (basicCardsIOwn == 4)
                    {
                        data.InnKeeperLine = CardRewardData.InnKeeperTrigger.SECOND_REWARD_EVER;
                    }
                    object[] args = new object[] { basicCardsIOwn, num, className };
                    details = GameStrings.Format("GLOBAL_REWARD_CORE_CARD_DETAILS", args);
                }
            }
            if (base.Data.Origin == NetCache.ProfileNotice.NoticeOrigin.LEVEL_UP)
            {
                TAG_CLASS          originData = (TAG_CLASS)((int)base.Data.OriginData);
                NetCache.HeroLevel heroLevel  = GameUtils.GetHeroLevel(originData);
                object[]           objArray2  = new object[] { heroLevel.CurrentLevel.Level.ToString(), GameStrings.GetClassName(originData) };
                source = GameStrings.Format("GLOBAL_REWARD_CARD_LEVEL_UP", objArray2);
            }
            else
            {
                source = string.Empty;
            }
            base.SetRewardText(headline, details, source);
        }
    }
 public void SetClass(TAG_CLASS classTag)
 {
     if (this.m_classIcon != null)
     {
         Vector2 offset = CollectionPageManager.s_classTextureOffsets[classTag];
         this.m_classIcon.GetComponent <Renderer>().material.SetTextureOffset("_MainTex", offset);
     }
     if (this.m_favoriteBannerText != null)
     {
         object[] args = new object[] { GameStrings.GetClassName(classTag) };
         this.m_favoriteBannerText.Text = GameStrings.Format("GLUE_COLLECTION_MANAGER_FAVORITE_DEFAULT_TEXT", args);
     }
 }
 public void SetClass(TAG_CLASS?classTag)
 {
     if (!classTag.HasValue)
     {
         this.SetClassNameText(string.Empty);
         this.ShowClassFlavorObjects(false);
     }
     else
     {
         TAG_CLASS tag = classTag.Value;
         this.SetClassNameText(GameStrings.GetClassName(tag));
         this.SetClassFlavorTextures(this.TagClassToHeaderClass(tag));
     }
 }
Exemple #6
0
 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;
     }
 }
Exemple #7
0
    private void SetupHeroAchieves()
    {
        List <Achievement> achievesInGroup = AchieveManager.Get().GetAchievesInGroup(Achievement.Group.UNLOCK_HERO);
        List <Achievement> list2           = AchieveManager.Get().GetAchievesInGroup(Achievement.Group.UNLOCK_HERO, true);
        int            count     = achievesInGroup.Count;
        int            num2      = list2.Count;
        CardRewardData data      = base.Data as CardRewardData;
        string         className = GameStrings.GetClassName(DefLoader.Get().GetEntityDef(data.CardID).GetClass());

        object[] args     = new object[] { className };
        string   headline = GameStrings.Format("GLOBAL_REWARD_HERO_HEADLINE", args);

        object[] objArray2 = new object[] { num2, count };
        string   details   = GameStrings.Format("GLOBAL_REWARD_HERO_DETAILS", objArray2);

        object[] objArray3 = new object[] { className };
        string   source    = GameStrings.Format("GLOBAL_REWARD_HERO_SOURCE", objArray3);

        base.SetRewardText(headline, details, source);
    }
 public void Init()
 {
     this.m_classNameText.Text = GameStrings.GetClassName(this.m_class);
 }