예제 #1
0
        public void SetupViewWithIdentifyStatus(StigmataDataItem stigmata, bool forceLock)
        {
            this._stigmata = stigmata;
            Transform containerTrans = base.transform.Find("PrefContainer");
            Transform transform2     = base.transform.Find("Mask/PrefContainer");
            Transform transform3     = base.transform.Find("Mask");

            this.SetupPrefIntoContainer(containerTrans, stigmata);
            if (stigmata.IsAffixIdentify && !forceLock)
            {
                this.SetImageAttrForAllChildren(containerTrans, null, Color.white);
                containerTrans.gameObject.SetActive(true);
                transform3.gameObject.SetActive(false);
            }
            else
            {
                containerTrans.gameObject.SetActive(false);
                Material mat = Miscs.LoadResource <Material>("Material/ImageColorize", BundleType.RESOURCE_FILE);
                this.SetImageAttrForAllChildren(containerTrans, mat, Color.white);
                transform3.gameObject.SetActive(true);
                this.SetupPrefIntoContainer(transform2, stigmata);
                Material material2 = Miscs.LoadResource <Material>("Material/ImageMonoColor", BundleType.RESOURCE_FILE);
                this.SetImageAttrForAllChildren(transform2, material2, MiscData.GetColor("DarkBlue"));
            }
        }
예제 #2
0
 private void SetupStigmata(Transform trans, StigmataDataItem stigmata)
 {
     this.SetStigmataImage(trans.Find("MaskPanel/Figure").GetComponent <RectTransform>(), stigmata);
     trans.Find("LvText").GetComponent <Text>().text   = "LV." + stigmata.level;
     trans.Find("Cost/Num").GetComponent <Text>().text = stigmata.GetCost().ToString();
     trans.Find("Star/EquipStar").GetComponent <MonoEquipSubStar>().SetupView(stigmata.rarity, stigmata.GetMaxRarity());
     trans.Find("Star/EquipSubStar").GetComponent <MonoEquipSubStar>().SetupView(stigmata.GetSubRarity(), stigmata.GetMaxSubRarity() - 1);
 }
예제 #3
0
        private void SetupPrefIntoContainer(Transform containerTrans, StigmataDataItem stigmata)
        {
            containerTrans.DestroyChildren();
            GameObject obj2 = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>(stigmata.GetImagePath(), BundleType.RESOURCE_FILE));

            obj2.transform.SetParent(containerTrans, false);
            obj2.gameObject.SetActive(true);
            obj2.GetComponent <RectTransform>().anchoredPosition = Vector2.zero;
        }
예제 #4
0
        public StigmataNewAffixPageContext(StigmataDataItem stigmata)
        {
            ContextPattern pattern = new ContextPattern {
                contextName    = "StigmataNewAffixPage",
                viewPrefabPath = "UI/Menus/Page/Storage/StigmataNewAffixPage"
            };

            base.config   = pattern;
            this.stigmata = stigmata;
        }
 private void SetupStigmataSkillInfo()
 {
     int num = 3;
     StigmataDataItem itemDataBefore = this.itemDataBefore as StigmataDataItem;
     List<EquipSkillDataItem> skills = itemDataBefore.skills;
     Transform transform = base.view.transform.Find("SkillPopup/StigmataSkills/ScrollerView/Content/NaturalSkills");
     transform.gameObject.SetActive(skills.Count > 0);
     string text = LocalizationGeneralLogic.GetText("Menu_Title_StigmataSkill", new object[0]);
     transform.Find("Name/Label").GetComponent<Text>().text = text;
     for (int i = 1; i <= num; i++)
     {
         Transform trans = base.view.transform.Find("SkillPopup/StigmataSkills/ScrollerView/Content/NaturalSkills/Desc/Skill_" + i);
         trans.gameObject.SetActive(true);
         if (i > skills.Count)
         {
             trans.gameObject.SetActive(false);
         }
         else
         {
             EquipSkillDataItem skillData = skills[i - 1];
             this.UpdateSkillContent(trans, skillData);
         }
     }
     Transform transform3 = base.view.transform.Find("SkillPopup/StigmataSkills/ScrollerView/Content/SetSkills");
     SortedDictionary<int, EquipSkillDataItem> allSetSkills = itemDataBefore.GetAllSetSkills();
     if (allSetSkills.Count == 0)
     {
         transform3.gameObject.SetActive(false);
     }
     else
     {
         transform3.gameObject.SetActive(true);
         transform3.Find("Name/Text").GetComponent<Text>().text = itemDataBefore.GetEquipSetName();
         Transform transform4 = transform3.Find("Desc");
         for (int j = 0; j < transform3.Find("Desc").childCount; j++)
         {
             int key = j + 2;
             Transform child = transform4.GetChild(j);
             if (child != null)
             {
                 EquipSkillDataItem item3;
                 allSetSkills.TryGetValue(key, out item3);
                 if (item3 == null)
                 {
                     child.gameObject.SetActive(false);
                 }
                 else
                 {
                     child.Find("Desc").GetComponent<Text>().text = item3.GetSkillDisplay(1);
                 }
             }
         }
     }
     base.view.transform.Find("SkillPopup/StigmataSkills").gameObject.SetActive(false);
 }
예제 #6
0
        private void SetupStigmata()
        {
            StigmataDataItem storageItem = this.storageItem as StigmataDataItem;

            base.view.transform.Find("Info/Content/Equipment/Title/TypeIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(storageItem.GetSmallIconPath());
            string displayTitle = this.storageItem.GetDisplayTitle();

            if (storageItem.IsAffixIdentify)
            {
                string affixName = storageItem.GetAffixName();
                if (!string.IsNullOrEmpty(affixName))
                {
                    displayTitle = MiscData.AddColor("Blue", affixName) + " " + displayTitle;
                }
            }
            else
            {
                displayTitle = MiscData.AddColor("WarningRed", storageItem.GetAffixName()) + " " + displayTitle;
            }
            base.view.transform.Find("Info/Content/Equipment/Title/Name").GetComponent <Text>().text = displayTitle;
            base.view.transform.Find("Info/Content/Equipment/Cost/Num").GetComponent <Text>().text   = this.storageItem.GetCost().ToString();
            this.SetupItemProtectedStatus();
            base.view.transform.Find("Info/Content/Equipment/Star/EquipStar").GetComponent <MonoEquipSubStar>().SetupView(this.storageItem.rarity, this.storageItem.GetMaxRarity());
            base.view.transform.Find("Info/Content/Equipment/Star/EquipSubStar").GetComponent <MonoEquipSubStar>().SetupView(this.storageItem.GetSubRarity(), this.storageItem.GetMaxSubRarity() - 1);
            base.view.transform.Find("Info/Figure").GetComponent <MonoStigmataFigure>().SetupViewWithIdentifyStatus(storageItem, this.hideActionBtns && !this.unlock);
            if (storageItem.IsAffixIdentify)
            {
                bool flag = (storageItem.CanRefine && (Singleton <TutorialModule> .Instance != null)) && UnlockUIDataReaderExtend.UnlockByTutorial(5);
                base.view.transform.Find("ActionBtns/NewAffixBtn").GetComponent <Button>().interactable = flag;
                bool flag2 = Singleton <StorageModule> .Instance.GetStigmatasCanUseForNewAffix(storageItem).Count > 0;

                base.view.transform.Find("ActionBtns/NewAffixBtn/PopUp").gameObject.SetActive(flag2 && flag);
            }
            else
            {
                base.view.transform.Find("ActionBtns/PowerUpBtn").GetComponent <Button>().interactable  = false;
                base.view.transform.Find("ActionBtns/RarityUpBtn").GetComponent <Button>().interactable = false;
                base.view.transform.Find("ActionBtns/NewAffixBtn").GetComponent <Button>().interactable = false;
                base.view.transform.Find("ActionBtns/NewAffixBtn/PopUp").gameObject.SetActive(false);
            }
            base.view.transform.Find("Info/Figure/InfoMark").gameObject.SetActive(storageItem.IsAffixIdentify && this.unlock);
            base.view.transform.Find("Info/IdentifyBtn").gameObject.SetActive((!this.hideActionBtns || this.showIdentifyBtnOnly) && !storageItem.IsAffixIdentify);
            base.view.transform.Find("Info/IdentifyBtn").GetComponent <DragObject>().Init(this.storageItem);
            base.view.transform.Find("Info/Content/Equipment/Desc").GetComponent <Text>().text = this.storageItem.GetDescription();
            base.view.transform.Find("Info/Content").gameObject.SetActive(true);
            AvatarDataItem item2 = Singleton <AvatarModule> .Instance.TryGetAvatarByID(this.storageItem.avatarID);

            base.view.transform.Find("Info/Content/BtnInEquip").gameObject.SetActive(item2 != null);
            if (item2 != null)
            {
                base.view.transform.Find("Info/Content/BtnInEquip/EquipChara").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(item2.IconPath);
            }
        }
예제 #7
0
 private void OnItemClick(StorageDataItemBase item, bool selected)
 {
     if ((this._selectedItem != null) && (item.uid == this._selectedItem.uid))
     {
         this._selectedItem = null;
     }
     else
     {
         this._selectedItem = item as StigmataDataItem;
     }
     this.UpdateInfo();
     base.view.transform.Find("SelectPanel/List").GetComponent <MonoGridScroller>().RefreshCurrent();
 }
예제 #8
0
        public override StorageDataItemBase Clone()
        {
            StigmataDataItem item = new StigmataDataItem(base.uid, this._metaData)
            {
                level  = base.level,
                exp    = base.exp,
                number = base.number
            };
            int num  = (this.PreAffixSkill != null) ? this.PreAffixSkill.affixID : 0;
            int num2 = (this.SufAffixSkill != null) ? this.SufAffixSkill.affixID : 0;

            item.SetAffixSkill(this.IsAffixIdentify, num, num2);
            return(item);
        }
예제 #9
0
        public void SetLeaderAvatar(AvatarDetailData avatarDetailData)
        {
            this.leaderAvatar = new AvatarDataItem((int)avatarDetailData.get_avatar_id(), (int)avatarDetailData.get_avatar_level(), (int)avatarDetailData.get_avatar_star());
            WeaponDetailData data = avatarDetailData.get_weapon();

            if ((data != null) && (WeaponMetaDataReader.GetWeaponMetaDataByKey((int)data.get_id()) != null))
            {
                WeaponDataItem item = new WeaponDataItem(0, WeaponMetaDataReader.GetWeaponMetaDataByKey((int)data.get_id()))
                {
                    level = (int)data.get_level()
                };
                this.leaderAvatar.equipsMap[1] = item;
            }
            EquipmentSlot[]           slotArray = new EquipmentSlot[] { 2, 3, 4 };
            List <StigmataDetailData> list      = new List <StigmataDetailData> {
                avatarDetailData.get_stigmata_1(),
                                      avatarDetailData.get_stigmata_2(),
                                      avatarDetailData.get_stigmata_3()
            };

            for (int i = 0; i < list.Count; i++)
            {
                StigmataDetailData data2 = list[i];
                if ((data2 != null) && (StigmataMetaDataReader.GetStigmataMetaDataByKey((int)data2.get_id()) != null))
                {
                    StigmataDataItem item2 = new StigmataDataItem(0, StigmataMetaDataReader.GetStigmataMetaDataByKey((int)data2.get_id()))
                    {
                        level = (int)data2.get_level()
                    };
                    int num2 = !data2.get_pre_affix_idSpecified() ? 0 : ((int)data2.get_pre_affix_id());
                    int num3 = !data2.get_suf_affix_idSpecified() ? 0 : ((int)data2.get_suf_affix_id());
                    item2.SetAffixSkill(true, num2, num3);
                    this.leaderAvatar.equipsMap[slotArray[i]] = item2;
                }
            }
            foreach (AvatarSkillDetailData data3 in avatarDetailData.get_skill_list())
            {
                if (this.leaderAvatar.GetAvatarSkillBySkillID((int)data3.get_skill_id()) != null)
                {
                    AvatarSkillDataItem avatarSkillBySkillID = this.leaderAvatar.GetAvatarSkillBySkillID((int)data3.get_skill_id());
                    foreach (AvatarSubSkillDetailData data4 in data3.get_sub_skill_list())
                    {
                        if (avatarSkillBySkillID.GetAvatarSubSkillBySubSkillId((int)data4.get_sub_skill_id()) != null)
                        {
                            avatarSkillBySkillID.GetAvatarSubSkillBySubSkillId((int)data4.get_sub_skill_id()).level = (int)data4.get_level();
                        }
                    }
                }
            }
        }
예제 #10
0
        private void SetupStigmataSkills()
        {
            StigmataDataItem storageItem = this.storageItem as StigmataDataItem;

            this._stigmataTabManager.Clear();
            this.SetupNaturalSkillsTab(storageItem);
            this.SetupAffixSkillsTab(storageItem);
            this.SetupSuitSkillsTab(storageItem);
            List <string> keys = this._stigmataTabManager.GetKeys();

            if (keys.Count > 0)
            {
                this._stigmataTabManager.ShowTab(keys[0]);
            }
        }
예제 #11
0
        private void SetupSuitSkillsTab(StigmataDataItem stigmataData)
        {
            SortedDictionary <int, EquipSkillDataItem> allSetSkills = stigmataData.GetAllSetSkills();

            if (allSetSkills.Count > 0)
            {
                base.view.transform.Find("Skills/Info/SuitSkills/Content").GetComponent <MonoStigmataSetSkillPanel>().SetupView(stigmataData, allSetSkills);
                this._stigmataTabManager.SetTab("S_Suit_Skill_Tab", base.view.transform.Find("Skills/TabBtns/TabBtn_2").GetComponent <Button>(), base.view.transform.Find("Skills/Info/SuitSkills").gameObject);
                base.view.transform.Find("Skills/TabBtns/TabBtn_2").gameObject.SetActive(true);
            }
            else
            {
                base.view.transform.Find("Skills/TabBtns/TabBtn_2").gameObject.SetActive(false);
                base.view.transform.Find("Skills/Info/SuitSkills").gameObject.SetActive(false);
            }
        }
예제 #12
0
        private void SetupNaturalSkillsTab(StigmataDataItem stigmataData)
        {
            List <EquipSkillDataItem> skills = stigmataData.skills;

            if (skills.Count > 0)
            {
                base.view.transform.Find("Skills/Info/NaturalSkills/Content").GetComponent <MonoEquipSkillPanel>().SetupView(skills, stigmataData.level);
                this._stigmataTabManager.SetTab("S_Skill_Tab", base.view.transform.Find("Skills/TabBtns/TabBtn_1").GetComponent <Button>(), base.view.transform.Find("Skills/Info/NaturalSkills").gameObject);
                base.view.transform.Find("Skills/TabBtns/TabBtn_1").gameObject.SetActive(true);
            }
            else
            {
                base.view.transform.Find("Skills/TabBtns/TabBtn_1").gameObject.SetActive(false);
                base.view.transform.Find("Skills/Info/NaturalSkills").gameObject.SetActive(false);
            }
        }
예제 #13
0
        private void SetupAffixSkillsTab(StigmataDataItem stigmataData)
        {
            List <StigmataDataItem.AffixSkillData> affixSkillList = stigmataData.GetAffixSkillList();

            if (!stigmataData.IsAffixIdentify || (affixSkillList.Count > 0))
            {
                base.view.transform.Find("Skills/Info/AffixSkills/Content").GetComponent <MonoStigmataAffixSkillPanel>().SetupView(stigmataData, affixSkillList);
                this._stigmataTabManager.SetTab("S_Affix_Skill_Tab", base.view.transform.Find("Skills/TabBtns/TabBtn_3").GetComponent <Button>(), base.view.transform.Find("Skills/Info/AffixSkills").gameObject);
                base.view.transform.Find("Skills/TabBtns/TabBtn_3").gameObject.SetActive(true);
            }
            else
            {
                base.view.transform.Find("Skills/TabBtns/TabBtn_3").gameObject.SetActive(false);
                base.view.transform.Find("Skills/Info/AffixSkills").gameObject.SetActive(false);
            }
        }
 private void SetupNewAffixInfo(float delay = 0f)
 {
     StigmataDataItem itemDataBefore = this.itemDataBefore as StigmataDataItem;
     StigmataDataItem itemDataAfter = this.itemDataAfter as StigmataDataItem;
     base.view.transform.Find("StigmataAffixInfo").gameObject.SetActive(true);
     if (itemDataBefore.GetAffixSkillList().Count > 0)
     {
         base.view.transform.Find("StigmataAffixInfo/OldAffix").gameObject.SetActive(true);
         base.view.transform.Find("StigmataAffixInfo/OldAffix/Skills/Content").GetComponent<MonoStigmataAffixSkillPanel>().SetupView(itemDataBefore, itemDataBefore.GetAffixSkillList());
     }
     else
     {
         base.view.transform.Find("StigmataAffixInfo/OldAffix").gameObject.SetActive(false);
     }
     base.view.transform.Find("StigmataAffixInfo/NewAffix/Skills/Content").GetComponent<MonoStigmataAffixSkillPanel>().SetupView(itemDataAfter, itemDataAfter.GetAffixSkillList());
     this.SetupStigmataSkillInfo();
     base.view.transform.Find("SkillPopup").gameObject.SetActive(true);
 }
예제 #15
0
        protected override bool SetupView()
        {
            base.view.transform.Find("Figure").GetComponent <MonoStigmataFigure>().SetupView(this.stigmata);
            this.SetupLvInfoPanel();
            this.SetupStigmataInfo(this.stigmata, base.view.transform.Find("OriginInfo"));
            this._showItemList = Singleton <StorageModule> .Instance.GetStigmatasCanUseForNewAffix(this.stigmata);

            this._showItemList.Sort(new Comparison <StigmataDataItem>(StorageDataItemBase.CompareToRarityAsc));
            this._selectedItem = null;
            if (this._showItemList.Count > 0)
            {
                this.SetupList();
                this.UpdateInfo();
            }
            else
            {
                this.SetupEmpty();
            }
            return(false);
        }
예제 #16
0
 public void SetupView(StigmataDataItem stigmataData, SortedDictionary <int, EquipSkillDataItem> setSkills)
 {
     for (int i = 0; i < base.transform.childCount; i++)
     {
         int       key       = i + 2;
         Transform transform = base.transform.Find("SetSkill_" + key);
         if (transform != null)
         {
             EquipSkillDataItem item;
             setSkills.TryGetValue(key, out item);
             if (item == null)
             {
                 transform.gameObject.SetActive(false);
             }
             else
             {
                 transform.Find("Desc").GetComponent <Text>().text = item.GetSkillDisplay(1);
             }
         }
     }
 }
예제 #17
0
        private void SetupStigmataInfo(StigmataDataItem m_stigmata, Transform trans)
        {
            trans.Find("Equipment/Content/Title/TypeIcon").GetComponent <Image>().sprite = Miscs.GetSpriteByPrefab(m_stigmata.GetSmallIconPath());
            string displayTitle = m_stigmata.GetDisplayTitle();

            if (m_stigmata.IsAffixIdentify)
            {
                string affixName = m_stigmata.GetAffixName();
                if (!string.IsNullOrEmpty(affixName))
                {
                    displayTitle = MiscData.AddColor("Blue", affixName) + " " + displayTitle;
                }
            }
            else
            {
                displayTitle = MiscData.AddColor("WarningRed", m_stigmata.GetAffixName()) + " " + displayTitle;
            }
            trans.Find("Equipment/Content/Title/Name").GetComponent <Text>().text = displayTitle;
            trans.Find("Equipment/Content/Star/EquipStar").GetComponent <MonoEquipSubStar>().SetupView(m_stigmata.rarity, m_stigmata.GetMaxRarity());
            trans.Find("Equipment/Content/Star/EquipSubStar").GetComponent <MonoEquipSubStar>().SetupView(m_stigmata.GetSubRarity(), m_stigmata.GetMaxSubRarity() - 1);
            trans.Find("AffixSkills/Skills/Content").GetComponent <MonoStigmataAffixSkillPanel>().SetupView(m_stigmata, m_stigmata.GetAffixSkillList());
        }
예제 #18
0
        public void SetupView(AvatarDataItem avatarDataItem, EquipmentSlot slot, int index, bool isRemoteAvatar)
        {
            this._avatarData     = avatarDataItem;
            this._slot           = slot;
            this._index          = index;
            this._isRemoteAvatar = isRemoteAvatar;
            this._stigmataData   = this._avatarData.GetStigmata(slot);
            Transform trans = base.transform.Find("Content/Stigmata");

            if (this._stigmataData == null)
            {
                trans.gameObject.SetActive(false);
                string textID = "Menu_StigmataSlot_" + this._index;
                base.transform.Find("Title/Text").GetComponent <Text>().text = LocalizationGeneralLogic.GetText(textID, new object[0]);
            }
            else
            {
                trans.gameObject.SetActive(true);
                base.transform.Find("Title/Text").GetComponent <Text>().text = this._stigmataData.GetDisplayTitle();
                this.SetupStigmata(trans, this._stigmataData);
            }
            base.transform.Find("ChangeBtn").gameObject.SetActive(!this._isRemoteAvatar);
        }
예제 #19
0
 public void SetupView(StigmataDataItem stigmataData, List <StigmataDataItem.AffixSkillData> affixSkills)
 {
     if (!stigmataData.IsAffixIdentify)
     {
         if (base.transform.Find("Name") != null)
         {
             base.transform.Find("Name").GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_AffixTab_NotIdentifyName", new object[0]);
         }
         Transform transform = base.transform.Find("AffixDesc_0");
         transform.gameObject.SetActive(true);
         transform.GetComponent <Text>().text = LocalizationGeneralLogic.GetText("Menu_AffixTab_NotIdentifyDesc", new object[0]);
         base.transform.Find("AffixDesc_1").gameObject.SetActive(false);
     }
     else
     {
         if (base.transform.Find("Name") != null)
         {
             base.transform.Find("Name").GetComponent <Text>().text = stigmataData.GetAffixName();
         }
         for (int i = 0; i < base.transform.childCount; i++)
         {
             Transform transform3 = base.transform.Find("AffixDesc_" + i);
             if (transform3 != null)
             {
                 if (i < affixSkills.Count)
                 {
                     transform3.gameObject.SetActive(true);
                     transform3.GetComponent <Text>().text = affixSkills[i].skill.GetSkillDisplay(stigmataData.level);
                 }
                 else
                 {
                     transform3.gameObject.SetActive(false);
                 }
             }
         }
     }
 }
예제 #20
0
 public void SetupViewWithIdentifyStatus(StigmataDataItem stigmata)
 {
     this._stigmata = stigmata;
     this.SetupViewWithIdentifyStatus(stigmata, false);
 }
예제 #21
0
 private void SetStigmataImage(RectTransform imageTrans, StigmataDataItem stigmata)
 {
     imageTrans.GetComponent <MonoStigmataFigure>().SetupView(stigmata);
     imageTrans.transform.Find("PrefContainer").localScale = (Vector3)(Vector3.one * stigmata.GetScale());
     imageTrans.anchoredPosition = new Vector2(stigmata.GetOffesetX(), stigmata.GetOffesetY());
 }
예제 #22
0
 private IEnumerator CorrutineChangeStigmata(StigmataDataItem from, StigmataDataItem to, EquipmentSlot slot)
 {
     return(new < CorrutineChangeStigmata > c__Iterator1D {
         slot = slot, from = from, to = to, <$> slot = slot, <$> from = from, <$> to = to, <> f__this = this
     });
예제 #23
0
 public void ChangeStigmata(StigmataDataItem from, StigmataDataItem to, EquipmentSlot slot)
 {
     base.StartCoroutine(this.CorrutineChangeStigmata(from, to, slot));
 }
예제 #24
0
 public void SetupView(StigmataDataItem stigmata)
 {
     this._stigmata = stigmata;
     this.SetupPrefIntoContainer(base.transform.Find("PrefContainer"), stigmata);
 }
예제 #25
0
 private void SetupStatus()
 {
     if (this._item != null)
     {
         StigmataDataItem item  = this._item as StigmataDataItem;
         float            hPAdd = this._item.GetHPAdd();
         if (item != null)
         {
             hPAdd = item.GetHPAddWithAffix(this._ownerData);
         }
         base.transform.Find("HP").gameObject.SetActive(hPAdd > 0f);
         base.transform.Find("HP/Num").GetComponent <Text>().text = Mathf.FloorToInt(hPAdd).ToString();
         float sPAdd = this._item.GetSPAdd();
         if (item != null)
         {
             sPAdd = item.GetSPAddWithAffix(this._ownerData);
         }
         base.transform.Find("SP").gameObject.SetActive(sPAdd > 0f);
         base.transform.Find("SP/Num").GetComponent <Text>().text = Mathf.FloorToInt(sPAdd).ToString();
         float attackAdd = this._item.GetAttackAdd();
         if (item != null)
         {
             attackAdd = item.GetAttackAddWithAffix(this._ownerData);
         }
         base.transform.Find("ATK").gameObject.SetActive(attackAdd > 0f);
         base.transform.Find("ATK/Num").GetComponent <Text>().text = Mathf.FloorToInt(attackAdd).ToString();
         float defenceAdd = this._item.GetDefenceAdd();
         if (item != null)
         {
             defenceAdd = item.GetDefenceAddWithAffix(this._ownerData);
         }
         base.transform.Find("DEF").gameObject.SetActive(defenceAdd > 0f);
         base.transform.Find("DEF/Num").GetComponent <Text>().text = Mathf.FloorToInt(defenceAdd).ToString();
         float criticalAdd = this._item.GetCriticalAdd();
         if (item != null)
         {
             criticalAdd = item.GetCriticalAddWithAffix(this._ownerData);
         }
         base.transform.Find("CRT").gameObject.SetActive(criticalAdd > 0f);
         base.transform.Find("CRT/Num").GetComponent <Text>().text = Mathf.FloorToInt(criticalAdd).ToString();
         if (base.transform.Find("Cost") != null)
         {
             base.transform.Find("Cost").gameObject.SetActive(this._item.GetCost() > 0);
             base.transform.Find("Cost/Num").GetComponent <Text>().text = Mathf.FloorToInt((float)this._item.GetCost()).ToString();
         }
     }
     else if (this._avatarData != null)
     {
         base.transform.Find("HP").gameObject.SetActive(this._avatarData.FinalHPUI > 0f);
         base.transform.Find("HP/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalHPUI).ToString();
         base.transform.Find("SP").gameObject.SetActive(this._avatarData.FinalSPUI > 0f);
         base.transform.Find("SP/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalSPUI).ToString();
         base.transform.Find("ATK").gameObject.SetActive(this._avatarData.FinalAttackUI > 0f);
         base.transform.Find("ATK/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalAttackUI).ToString();
         base.transform.Find("DEF").gameObject.SetActive(this._avatarData.FinalDefenseUI > 0f);
         base.transform.Find("DEF/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalDefenseUI).ToString();
         base.transform.Find("CRT").gameObject.SetActive(this._avatarData.FinalDefenseUI > 0f);
         base.transform.Find("CRT/Num").GetComponent <Text>().text = Mathf.FloorToInt(this._avatarData.FinalCriticalUI).ToString();
         if (base.transform.Find("Cost") != null)
         {
             base.transform.Find("Cost").gameObject.SetActive(this._avatarData.GetCurrentCost() > 0);
             base.transform.Find("Cost/Num").GetComponent <Text>().text = Mathf.FloorToInt((float)this._avatarData.GetCurrentCost()).ToString();
         }
     }
 }