private void SkillTableParam(SkillItemTable.SkillItemData table_data)
 {
     SetActive(detailBase, UI.OBJ_SUB_STATUS, true);
     SetLabelText(detailBase, UI.LBL_NAME, table_data.name);
     SetLabelText(detailBase, UI.LBL_LV_NOW, "1");
     SetLabelText(detailBase, UI.LBL_LV_MAX, table_data.GetMaxLv(0).ToString());
     SetLabelText(detailBase, UI.LBL_ATK, table_data.baseAtk.ToString());
     SetLabelText(detailBase, UI.LBL_DEF, table_data.baseDef.ToString());
     SetLabelText(detailBase, UI.LBL_HP, table_data.baseHp.ToString());
     SetLabelText(detailBase, UI.LBL_SELL, table_data.baseSell.ToString());
     SetLabelText(detailBase, UI.LBL_DESCRIPTION, table_data.GetExplanationText(1));
     SetActive(detailBase, UI.OBJ_FAVORITE_ROOT, false);
     SetRenderSkillItemModel((Enum)UI.TEX_MODEL, table_data.id, true, false);
     SetRenderSkillItemSymbolModel((Enum)UI.TEX_INNER_MODEL, table_data.id, true);
     SetProgressInt(detailBase, UI.PRG_EXP_BAR, 0, -1, -1, null);
     SetSkillSlotTypeIcon(detailBase, UI.SPR_SKILL_TYPE_ICON, UI.SPR_SKILL_TYPE_ICON_BG, UI.SPR_SKILL_TYPE_ICON_RARITY, table_data);
 }
Пример #2
0
    public override void UpdateUI()
    {
        bool flag = MonoBehaviourSingleton <GachaManager> .I.selectGacha.num == 1;

        SetActive((Enum)UI.OBJ_SINGLE_ROOT, flag);
        SetActive((Enum)UI.OBJ_MULTI_ROOT, !flag);
        if (flag)
        {
            GachaResult.GachaReward      gachaReward   = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0];
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)gachaReward.itemId);

            if (skillItemData == null)
            {
                SetActive((Enum)UI.OBJ_SINGLE_ROOT, false);
            }
            SetLabelText((Enum)UI.LBL_NAME, skillItemData.name);
            SetLabelText((Enum)UI.LBL_ATK, skillItemData.baseAtk.ToString());
            SetLabelText((Enum)UI.LBL_DEF, skillItemData.baseDef.ToString());
            SetLabelText((Enum)UI.LBL_HP, skillItemData.baseHp.ToString());
            SetLabelText((Enum)UI.LBL_DESCRIPTION, skillItemData.GetExplanationText(1));
            SetRenderSkillItemModel((Enum)UI.TEX_MODEL, skillItemData.id, true, false);
            SetRenderSkillItemSymbolModel((Enum)UI.TEX_INNER_MODEL, skillItemData.id, true);
            RARITY_TYPE[] array = (RARITY_TYPE[])Enum.GetValues(typeof(RARITY_TYPE));
            int           i     = 0;
            for (int num = array.Length; i < num; i++)
            {
                SetActive((Enum)rarityAnimRoot[i], skillItemData.rarity == array[i]);
            }
            ResetTween((Enum)rarityAnimRoot[(int)skillItemData.rarity], 0);
            ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0);
            if (skillItemData.rarity <= RARITY_TYPE.C)
            {
                ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0);
                PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0);
            }
            PlayTween((Enum)rarityAnimRoot[(int)skillItemData.rarity], true, (EventDelegate.Callback)null, false, 0);
            PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0);
            if (AnimationDirector.I is SkillGachaDirector)
            {
                (AnimationDirector.I as SkillGachaDirector).PlayUIRarityEffect(skillItemData.rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(rarityAnimRoot[(int)skillItemData.rarity]));
            }
        }
        else
        {
            int index = 0;
            MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.ForEach(delegate(GachaResult.GachaReward reward)
            {
                bool flag2     = false;
                Transform ctrl = GetCtrl(iconRootAry[index]);
                SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)reward.itemId);
                if (skillItemData2 == null)
                {
                    SetActive(ctrl, false);
                }
                else
                {
                    SetActive(ctrl, true);
                    bool is_new       = flag2;
                    ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon(REWARD_TYPE.SKILL_ITEM, (uint)reward.itemId, ctrl, -1, null, 0, is_new, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT);
                    itemIcon.SetEnableCollider(false);
                    Transform ctrl2 = GetCtrl(magiNameAry[index]);
                    SetLabelText(ctrl2, skillItemData2.name);
                    SetEvent(GetCtrl(iconRootAry[index]), "SKILL_DETAIL", index);
                    index++;
                }
            });
        }
        int num2 = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal;

        if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId);

            UITexture[] array2 = new UITexture[3]
            {
                FindCtrl(GetCtrl(UI.OBJ_GACHA_DISABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                FindCtrl(GetCtrl(UI.OBJ_GACHA_ENABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                GetCtrl(UI.TEX_TICKET_HAVE).GetComponent <UITexture>()
            };
            UITexture[] array3 = array2;
            foreach (UITexture ui_tex in array3)
            {
                ResourceLoad.LoadItemIconTexture(ui_tex, itemData.iconID);
            }
            num2 = MonoBehaviourSingleton <InventoryManager> .I.GetItemNum((ItemInfo x) => x.tableData.id == itemData.id, 1, false);
        }
        SetActive(footerRoot, UI.SPR_CRYSTAL, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId == 0);
        SetActive(footerRoot, UI.TEX_TICKET_HAVE, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0);
        SetLabelText(footerRoot, UI.LBL_CRYSTAL_NUM, num2.ToString());
        SetGachaButtonActive(!MonoBehaviourSingleton <GachaManager> .I.IsSelectTutorialGacha() && MonoBehaviourSingleton <GachaManager> .I.gachaResult.remainCount != 0);
    }