Ejemplo n.º 1
0
    private void OnQuery_SKILL_DETAIL()
    {
        uint itemId;

        if (GameSection.GetEventData() is int)
        {
            int num   = (int)GameSection.GetEventData();
            int count = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count;
            if (num < 0 || num >= count)
            {
                GameSection.StopEvent();
                return;
            }
            itemId = (uint)MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[num].itemId;
        }
        else
        {
            itemId = (uint)nextGuachaGuarantee.itemId;
        }
        SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(itemId);

        if (skillItemData == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            GameSection.SetEventData(new object[2]
            {
                ItemDetailEquip.CURRENT_SECTION.GACHA_RESULT,
                skillItemData
            });
        }
    }
    private void SkillParam(SkillItemInfo item)
    {
        SetActive(detailBase, UI.OBJ_SUB_STATUS, true);
        SkillItemTable.SkillItemData tableData = item.tableData;
        SetLabelText(detailBase, UI.LBL_NAME, tableData.name);
        SkillCompareParam(item, GetCompareItem());
        SetLabelText(detailBase, UI.LBL_SELL, item.sellPrice.ToString());
        SetSupportEncoding(UI.LBL_DESCRIPTION, true);
        SetLabelText(detailBase, UI.LBL_DESCRIPTION, item.GetExplanationText(true));
        bool is_visible = (callSection & (ItemDetailEquip.CURRENT_SECTION.SMITH_CREATE | ItemDetailEquip.CURRENT_SECTION.SMITH_SKILL_MATERIAL | ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT | ItemDetailEquip.CURRENT_SECTION.UI_PARTS | ItemDetailEquip.CURRENT_SECTION.EQUIP_LIST)) == ItemDetailEquip.CURRENT_SECTION.NONE;

        SetActive(detailBase, UI.OBJ_FAVORITE_ROOT, is_visible);
        ResetTween(detailBase, UI.TWN_FAVORITE, 0);
        ResetTween(detailBase, UI.TWN_UNFAVORITE, 0);
        SetActive(detailBase, UI.TWN_UNFAVORITE, !item.isFavorite);
        SetActive(detailBase, UI.TWN_FAVORITE, item.isFavorite);
        if (item.IsLevelMax())
        {
            SetProgressInt(detailBase, UI.PRG_EXP_BAR, item.exceedExp, item.exceedExpPrev, item.exceedExpNext, null);
        }
        else
        {
            SetProgressInt(detailBase, UI.PRG_EXP_BAR, item.exp, item.expPrev, item.expNext, null);
        }
        SetSkillSlotTypeIcon(detailBase, UI.SPR_SKILL_TYPE_ICON, UI.SPR_SKILL_TYPE_ICON_BG, UI.SPR_SKILL_TYPE_ICON_RARITY, tableData);
        SetRenderSkillItemModel((Enum)UI.TEX_MODEL, tableData.id, true, false);
        SetRenderSkillItemSymbolModel((Enum)UI.TEX_INNER_MODEL, tableData.id, true);
    }
Ejemplo n.º 3
0
    private bool IsSkillApplyShield(SkillItemTable.SkillItemData tableData)
    {
        if (tableData == null)
        {
            return(false);
        }
        if (!tableData.supportType.IsNullOrEmpty() && Array.IndexOf(tableData.supportType, BuffParam.BUFFTYPE.SHIELD) >= 0)
        {
            return(true);
        }
        if (!tableData.buffTableIds.IsNullOrEmpty())
        {
            if (!Singleton <BuffTable> .IsValid())
            {
                return(false);
            }
            BuffTable.BuffData buffData = null;
            for (int i = 0; i < tableData.buffTableIds.Length; i++)
            {
                buffData = Singleton <BuffTable> .I.GetData((uint)tableData.buffTableIds[i]);

                if (buffData.type == BuffParam.BUFFTYPE.SHIELD)
                {
                    return(true);
                }
            }
        }
        return(false);
    }
Ejemplo n.º 4
0
 public void Init(int anim_index, SkillItemTable.SkillItemData table, Texture tex, GachaList.GachaPickupAnim anim)
 {
     if (pattern == null)
     {
         pattern = this.GetComponentsInChildren <GachaSkillBannerAnimPattern>();
     }
     if (pattern == null || pattern.Length <= anim_index)
     {
         Log.Error("Skill Gacha Anim Pattern is not Found!");
         if (pattern != null)
         {
             Log.Error("index = " + anim_index);
         }
     }
     else
     {
         int i = 0;
         for (int num = pattern.Length; i < num; i++)
         {
             pattern[i].Finish();
         }
         GachaSkillBannerAnimPattern gachaSkillBannerAnimPattern = pattern[anim_index];
         targetIndex = anim_index;
         gachaSkillBannerAnimPattern.Init(targetIndex, table, tex, anim);
     }
 }
        public static DropAnnounceInfo CreateSkillItemInfo(uint id, int num, out bool is_rare)
        {
            is_rare = false;
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(id);

            if (skillItemData == null)
            {
                return(null);
            }
            DropAnnounceInfo dropAnnounceInfo = new DropAnnounceInfo();

            dropAnnounceInfo.text = StringTable.Format(STRING_CATEGORY.IN_GAME, 2002u, skillItemData.name, num);
            switch (skillItemData.type)
            {
            case SKILL_SLOT_TYPE.ATTACK:
                dropAnnounceInfo.color = COLOR.MAGI_AT;
                break;

            case SKILL_SLOT_TYPE.HEAL:
                dropAnnounceInfo.color = COLOR.MAGI_HE;
                break;

            case SKILL_SLOT_TYPE.SUPPORT:
                dropAnnounceInfo.color = COLOR.MAGI_SU;
                break;

            default:
                dropAnnounceInfo.color = COLOR.MAGI_PA;
                break;
            }
            is_rare = true;
            return(dropAnnounceInfo);
        }
    private void Drop()
    {
        //IL_0041: Unknown result type (might be due to invalid IL or missing references)
        //IL_012d: Unknown result type (might be due to invalid IL or missing references)
        //IL_0145: Unknown result type (might be due to invalid IL or missing references)
        sectionCommandReceiver.OnHideRarity();
        int i = 0;

        for (int count = managedEffects.Count; i < count; i++)
        {
            if (managedEffects[i] != null)
            {
                Object.Destroy(managedEffects[i].get_gameObject());
            }
        }
        managedEffects.Clear();
        rarity = RARITY_TYPE.D;
        reward = null;
        if (MonoBehaviourSingleton <GachaManager> .IsValid() && MonoBehaviourSingleton <GachaManager> .I.gachaResult != null && dropCount < MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count)
        {
            reward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[dropCount];
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)reward.itemId);

            if (skillItemData != null)
            {
                rarity = skillItemData.rarity;
            }
        }
        if (reward == null)
        {
            reward = new GachaResult.GachaReward();
        }
        rarityIndex = rarity.ToRarityExpressionID();
        if (mainBall != null)
        {
            Object.Destroy(mainBall.get_gameObject());
        }
        mainBall = CreateBall(ballSocket, rarityIndex, Vector3.get_zero(), true);
        string text;

        if (dropCount != 0)
        {
            text = ((dropCount >= 10) ? "SKILL_GACHA_REAM_DROP_2" : "SKILL_GACHA_REAM_DROP_1");
        }
        else
        {
            text = ((!IsSingleGacha) ? "SKILL_GACHA_REAM" : "SKILL_GACHA_SINGLE");
            Play(text, null, 0f);
        }
        npcAnimator.Play(text, 0, 0f);
        gachaAnimator.Play(text, 0, 0f);
        cameraAnimator.Play(text, 0, 0f);
    }
Ejemplo n.º 7
0
    public static string GetExplanationText(SkillItemTable.SkillItemData table_data, int level)
    {
        GrowSkillItemTable.GrowSkillItemData grow_data = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(table_data.growID, level);

        string text = GetExplanationText(table_data.text, (EXPLANATION_COMMAND cmd) => GetStatusText(cmd, table_data, grow_data, level));
        int    num  = grow_data.exceedCnt;

        if (level >= table_data.GetMaxLv(0) && (Singleton <ExceedSkillItemTable> .I.IsExistExceed(num + 1) || num > 0))
        {
            text = text + "\n" + GetExceedExplanationText(num);
        }
        return(text);
    }
Ejemplo n.º 8
0
    private void OnQuery_SLOT_DETAIL()
    {
        selectIndex = (int)GameSection.GetEventData();
        ItemDetailEquip.CURRENT_SECTION cURRENT_SECTION = callSection;
        if (cURRENT_SECTION != ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT)
        {
            cURRENT_SECTION = ItemDetailEquip.CURRENT_SECTION.STATUS_SKILL_LIST;
        }
        bool flag = false;

        if (isSkillUniqItem)
        {
            SkillItemInfo itemData = slotData[selectIndex].itemData;
            if (itemData != null)
            {
                SkillItemSortData skillItemSortData = new SkillItemSortData();
                skillItemSortData.SetItem(itemData);
                EquipItemInfo equipItemInfo = eventData as EquipItemInfo;
                GameSection.SetEventData(new object[4]
                {
                    cURRENT_SECTION,
                    skillItemSortData,
                    equipItemInfo,
                    selectIndex
                });
            }
            else
            {
                flag = true;
            }
        }
        else if (slotData[selectIndex].slotData.skill_id != 0)
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(slotData[selectIndex].slotData.skill_id);

            GameSection.SetEventData(new object[2]
            {
                cURRENT_SECTION,
                skillItemData
            });
        }
        else
        {
            flag = true;
        }
        if (flag)
        {
            GameSection.StopEvent();
        }
    }
Ejemplo n.º 9
0
    private IEnumerator DoLoadSkillItemSymbol(SkillItemTable.SkillItemData data)
    {
        LoadObject lo = loadingQueue.LoadAndInstantiate(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemSymbolModel(data.iconID));

        yield return((object)loadingQueue.Wait());

        Transform item = lo.Realizes(_transform, _transform.get_gameObject().get_layer());

        item.set_localPosition(Vector3.get_zero());
        item.set_localRotation(Quaternion.get_identity());
        nodeMain    = item;
        displayInfo = MonoBehaviourSingleton <GlobalSettingsManager> .I.uiModelRendering.itemDisplayInfo;
        OnLoadFinished();
    }
 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);
 }
Ejemplo n.º 11
0
    public void LoadSkillItem(uint skill_item_id, Transform parent, int layer, Action _callback = null)
    {
        if (skillItemID != skill_item_id)
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(skill_item_id);

            if (skillItemData != null)
            {
                Init(DoLoadSkillItem(skillItemData), parent, layer, -1, -1, _callback);
                skillItemID = skill_item_id;
            }
            else
            {
                Clear();
            }
        }
    }
Ejemplo n.º 12
0
    public RARITY_TYPE GetMaxRarity()
    {
        RARITY_TYPE rARITY_TYPE = RARITY_TYPE.D;

        if (gachaResult != null && gachaResult.reward != null)
        {
            int i = 0;
            for (int count = gachaResult.reward.Count; i < count; i++)
            {
                GachaResult.GachaReward gachaReward  = gachaResult.reward[i];
                RARITY_TYPE             rARITY_TYPE2 = RARITY_TYPE.D;
                switch (selectGachaType)
                {
                case GACHA_TYPE.QUEST:
                {
                    QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)gachaReward.itemId);

                    if (questData != null)
                    {
                        rARITY_TYPE2 = questData.rarity;
                    }
                    break;
                }

                case GACHA_TYPE.SKILL:
                {
                    SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)gachaReward.itemId);

                    if (skillItemData != null)
                    {
                        rARITY_TYPE2 = skillItemData.rarity;
                    }
                    break;
                }
                }
                if (rARITY_TYPE < rARITY_TYPE2)
                {
                    rARITY_TYPE = rARITY_TYPE2;
                }
            }
        }
        return(rARITY_TYPE);
    }
Ejemplo n.º 13
0
        private void _GetDefaultSkillBuffParam(out int[] atk, out int[] def, out int hp)
        {
            atk = new int[7];
            def = new int[7];
            int i = 0;

            for (int num = 7; i < num; i++)
            {
                atk[i] = 0;
                def[i] = 0;
            }
            hp = 0;
            int j = 0;

            for (int num2 = maxSlot; j < num2; j++)
            {
                SkillItemTable.SkillSlotData skillSlotData = GetSkillSlot(0)[j];
                if (skillSlotData != null && skillSlotData.skill_id != 0)
                {
                    SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(skillSlotData.skill_id);

                    if (skillItemData != null)
                    {
                        GrowSkillItemTable.GrowSkillItemData growSkillItemData = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(skillItemData.growID, 1);

                        if (growSkillItemData != null)
                        {
                            atk[0] += growSkillItemData.GetGrowParamAtk(skillItemData.baseAtk);
                            def[0] += growSkillItemData.GetGrowParamDef(skillItemData.baseDef);
                            hp     += growSkillItemData.GetGrowParamHp(skillItemData.baseHp);
                            int[] growParamElemAtk = growSkillItemData.GetGrowParamElemAtk(skillItemData.atkElement);
                            int[] growParamElemDef = growSkillItemData.GetGrowParamElemDef(skillItemData.defElement);
                            int   k = 1;
                            for (int num3 = 7; k < num3; k++)
                            {
                                atk[k] += growParamElemAtk[k - 1];
                                def[k] += growParamElemDef[k - 1];
                            }
                        }
                    }
                }
            }
        }
    public override void UpdateUI()
    {
        SetupDetailBase();
        SkillItemInfo skillItemInfo = itemData as SkillItemInfo;

        SkillItemTable.SkillItemData skillItemData = itemData as SkillItemTable.SkillItemData;
        if (skillItemInfo != null)
        {
            SkillParam(skillItemInfo);
        }
        else if (skillItemData != null)
        {
            SkillTableParam(skillItemData);
        }
        else
        {
            NotDataEquipParam();
        }
    }
Ejemplo n.º 15
0
 public void Init(int index, SkillItemTable.SkillItemData table, Texture tex, GachaList.GachaPickupAnim anim)
 {
     //IL_000f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0027: Expected O, but got Unknown
     //IL_0040: Unknown result type (might be due to invalid IL or missing references)
     //IL_0046: Unknown result type (might be due to invalid IL or missing references)
     //IL_005f: Unknown result type (might be due to invalid IL or missing references)
     //IL_0077: Expected O, but got Unknown
     //IL_0091: Unknown result type (might be due to invalid IL or missing references)
     //IL_0097: Unknown result type (might be due to invalid IL or missing references)
     //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
     //IL_00c8: Expected O, but got Unknown
     //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
     //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
     //IL_0100: Unknown result type (might be due to invalid IL or missing references)
     //IL_0118: Expected O, but got Unknown
     //IL_0131: Unknown result type (might be due to invalid IL or missing references)
     //IL_0137: Unknown result type (might be due to invalid IL or missing references)
     //IL_0151: Unknown result type (might be due to invalid IL or missing references)
     //IL_016a: Expected O, but got Unknown
     //IL_0186: Unknown result type (might be due to invalid IL or missing references)
     //IL_018d: Unknown result type (might be due to invalid IL or missing references)
     //IL_01a4: Unknown result type (might be due to invalid IL or missing references)
     GachaList.GachaPickupAnim.TextStyle name = anim.name;
     SetFontStyle(lblName.get_transform(), (name.italic == 1) ? 2 : 0);
     SetPatternText(lblName, table.name, name.size, name.toColor(), name.toOutColor());
     GachaList.GachaPickupAnim.TextStyle description = anim.description;
     SetFontStyle(lblDescription.get_transform(), (description.italic == 1) ? 2 : 0);
     SetPatternText(lblDescription, SkillItemInfo.GetExplanationText(table, 1), description.size, description.toColor(), description.toOutColor());
     GachaList.GachaPickupAnim.TextStyle sub = anim.sub;
     SetFontStyle(lblSubDescription.get_transform(), (sub.italic == 1) ? 2 : 0);
     SetPatternText(lblSubDescription, sub.text, sub.size, sub.toColor(), sub.toOutColor());
     GachaList.GachaPickupAnim.TextStyle adda = anim.adda;
     SetFontStyle(lblAddText_A.get_transform(), (adda.italic == 1) ? 2 : 0);
     SetPatternText(lblAddText_A, adda.text, adda.size, adda.toColor(), adda.toOutColor());
     GachaList.GachaPickupAnim.TextStyle addb = anim.addb;
     SetFontStyle(lblAddText_B.get_transform(), (addb.italic == 1) ? 2 : 0);
     SetPatternText(lblAddText_B, addb.text, addb.size, addb.toColor(), addb.toOutColor());
     uiTex.mainTexture = tex;
     this.get_gameObject().SetActive(true);
 }
Ejemplo n.º 16
0
    private void SortGachaResult()
    {
        int num   = -1;
        int index = -1;

        if (selectGachaType == GACHA_TYPE.QUEST)
        {
            int i = 0;
            for (int count = gachaResult.reward.Count; i < count; i++)
            {
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)gachaResult.reward[i].itemId);

                if (questData != null && (int)questData.rarity > num)
                {
                    num   = (int)questData.rarity;
                    index = i;
                }
            }
        }
        else
        {
            if (selectGachaType != GACHA_TYPE.SKILL)
            {
                return;
            }
            int j = 0;
            for (int count2 = gachaResult.reward.Count; j < count2; j++)
            {
                SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)gachaResult.reward[j].itemId);

                if (skillItemData != null && (int)skillItemData.rarity > num)
                {
                    num   = (int)skillItemData.rarity;
                    index = j;
                }
            }
        }
        GachaResult.GachaReward value = gachaResult.reward[index];
        gachaResult.reward[index] = gachaResult.reward[gachaResult.reward.Count - 1];
        gachaResult.reward[gachaResult.reward.Count - 1] = value;
    }
            protected override bool IsCondition(PointShopItem item)
            {
                switch (item.type)
                {
                case 3:
                case 10:
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)item.itemId);

                    if (itemData.type == ITEM_TYPE.USE_ITEM)
                    {
                        return(false);
                    }
                    return(itemData.rarity == rarity);
                }

                case 4:
                {
                    EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)item.itemId);

                    return(equipItemData.rarity == rarity);
                }

                case 6:
                {
                    QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)item.itemId);

                    return(questData.rarity == rarity);
                }

                case 5:
                {
                    SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)item.itemId);

                    return(skillItemData.rarity == rarity);
                }

                default:
                    return(false);
                }
            }
    private int CalcNumRarityData(RARITY_TYPE targetRarityType, bool isCheckOnlyLast = false, bool isCheck10 = false)
    {
        int num = 0;

        if (!MonoBehaviourSingleton <GachaManager> .IsValid())
        {
            Log.Error("Invalid GachaManager!!");
            return(num);
        }
        GachaResult gachaResult = MonoBehaviourSingleton <GachaManager> .I.gachaResult;

        if (gachaResult == null)
        {
            Log.Error("gachaResult is null!!");
            return(num);
        }
        int num2 = gachaResult.reward.Count;
        List <GachaResult.GachaReward> list = gachaResult.reward;

        if (isCheckOnlyLast)
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)list[num2 - 1].itemId);

            return((skillItemData.rarity == targetRarityType) ? 1 : 0);
        }
        if (isCheck10 && isReam)
        {
            num2--;
        }
        for (int i = 0; i < num2; i++)
        {
            SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)list[i].itemId);

            if (skillItemData2 != null && skillItemData2.rarity == targetRarityType)
            {
                num++;
            }
        }
        return(num);
    }
Ejemplo n.º 19
0
 protected void ChengeSkillType(int index, SkillItemTable.SkillItemData data, float percent)
 {
     //IL_006a: Unknown result type (might be due to invalid IL or missing references)
     //IL_009d: Unknown result type (might be due to invalid IL or missing references)
     ReleaseEffects();
     if (coolTimeGuage != null)
     {
         if (percent > 0f)
         {
             if (percent < 0.2f)
             {
                 percent = 0.2f;
             }
             coolTimeGuage.SetPercent(percent, false);
         }
         else
         {
             coolTimeGuage.SetPercent(percent, false);
         }
     }
     if (skillIconOff != null)
     {
         skillIconOff.get_gameObject().SetActive(true);
         ResourceLoad.LoadItemIconTexture(skillIconOff, data.iconID);
     }
     if (skillIconOn != null)
     {
         skillIconOn.get_gameObject().SetActive(true);
         ResourceLoad.LoadItemIconTexture(skillIconOn, data.iconID);
     }
     SetSlotType(data.type);
     skillTypeOFF.alpha = 1f;
     isPrevGaugeMax     = (percent <= 0f);
     maxEffect.Init(this);
     UpdateSilence();
 }
    private IEnumerator DoInitialize()
    {
        SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo;

        magiLoader = new GameObject("magimodel").AddComponent <ItemLoader>();
        int wait3 = 1;

        magiLoader.LoadSkillItem(skillItemInfo.tableID, magiLoader.get_transform(), magiLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003C_003Ef__this.magiLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003Cwait_003E__1--;
        });
        wait3++;
        magiSymbolLoader = new GameObject("magisymbol").AddComponent <ItemLoader>();
        magiSymbolLoader.LoadSkillItemSymbol(skillItemInfo.tableID, magiSymbolLoader.get_transform(), magiSymbolLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003C_003Ef__this.magiSymbolLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003Cwait_003E__1--;
        });
        LoadingQueue loadingQueue = new LoadingQueue(this);
        LoadObject   lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "GrowSkillDirection", false);

        LoadObject[] materialLoadObjects = new LoadObject[materials.Length];
        for (int j = 0; j < materials.Length; j++)
        {
            SkillItemTable.SkillItemData data = Singleton <SkillItemTable> .I.GetSkillItemData(materials[j].tableID);

            materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(data.modelID), false);
        }
        wait3++;
        NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3);

        GameObject npcRoot = new GameObject("NPC");

        npcData.LoadModel(npcRoot, false, true, delegate
        {
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0224: stateMachine*/)._003Cwait_003E__1--;
        }, false);
        CacheAudio(loadingQueue);
        yield return((object)loadingQueue.Wait());

        while (wait3 > 0)
        {
            yield return((object)null);
        }
        Object    directionObject    = lo_direction.loadedObject;
        Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1);

        GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length];
        for (int i = 0; i < materials.Length; i++)
        {
            SkillItemTable.SkillItemData data2 = Singleton <SkillItemTable> .I.GetSkillItemData(materials[i].tableID);

            Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1);
            PlayerLoader.SetEquipColor(item, data2.modelColor.ToColor());
            materialObjects[i] = item.get_gameObject();
        }
        magiLoader.nodeMain.get_gameObject().SetActive(true);
        magiSymbolLoader.nodeMain.get_gameObject().SetActive(true);
        SkillGrowDirector d = directionTransform.GetComponent <SkillGrowDirector>();

        d.Init();
        d.SetNPC(npcRoot);
        d.SetMagiModel(magiLoader.get_gameObject(), magiSymbolLoader.get_gameObject(), materialObjects);
        d.SetMaterials(materials);
        director = d;
        base.Initialize();
    }
Ejemplo n.º 21
0
    protected EquipItemAndSkillData[] GetEquipSetAttachSkillListData(List <CharaInfo.EquipItem> equip_item_data)
    {
        EquipItemAndSkillData[] ary = new EquipItemAndSkillData[7];
        int weapon_cnt = 0;

        equip_item_data.ForEach(delegate(CharaInfo.EquipItem data)
        {
            EquipItemAndSkillData equipItemAndSkillData = new EquipItemAndSkillData
            {
                equipItemInfo = new EquipItemInfo(data)
            };
            int maxSlot             = equipItemAndSkillData.equipItemInfo.GetMaxSlot();
            SkillSlotUIData[] array = new SkillSlotUIData[maxSlot];
            List <int> list         = new List <int>();
            int j = 0;
            for (int num = maxSlot; j < num; j++)
            {
                array[j]                   = new SkillSlotUIData();
                array[j].slotData          = equipItemAndSkillData.equipItemInfo.tableData.GetSkillSlot(data.exceed)[j];
                array[j].slotData.skill_id = 0u;
                array[j].itemData          = null;
                int k = 0;
                for (int count = data.sIds.Count; k < count; k++)
                {
                    if (list.IndexOf(k) == -1)
                    {
                        SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)data.sIds[k]);
                        if (skillItemData.type == array[j].slotData.slotType)
                        {
                            int exceed = 0;
                            if (k < data.sExs.Count)
                            {
                                exceed = data.sExs[k];
                            }
                            array[j].itemData          = new SkillItemInfo(j, data.sIds[k], data.sLvs[k], exceed);
                            array[j].slotData.skill_id = (uint)data.sIds[k];
                            list.Add(k);
                            break;
                        }
                    }
                }
            }
            equipItemAndSkillData.skillSlotUIData = array;
            int num2 = 0;
            switch (equipItemAndSkillData.equipItemInfo.tableData.type)
            {
            case EQUIPMENT_TYPE.ARMOR:
                num2 = 3;
                break;

            case EQUIPMENT_TYPE.HELM:
                num2 = 4;
                break;

            case EQUIPMENT_TYPE.ARM:
                num2 = 5;
                break;

            case EQUIPMENT_TYPE.LEG:
                num2 = 6;
                break;

            default:
                num2 = ++weapon_cnt;
                break;
            }
            ary[num2] = equipItemAndSkillData;
        });
        for (int i = 0; i < 7; i++)
        {
            if (ary[i] == null)
            {
                ary[i] = new EquipItemAndSkillData();
            }
        }
        return(ary);
    }
Ejemplo n.º 22
0
 public override void UpdateUI()
 {
     //IL_02a4: Unknown result type (might be due to invalid IL or missing references)
     if (callSection == ItemDetailEquip.CURRENT_SECTION.SMITH_CREATE || callSection == ItemDetailEquip.CURRENT_SECTION.EQUIP_LIST)
     {
         equipData = (eventData as EquipItemTable.EquipItemData);
         slotData  = GetSkillSlotData(eventData as EquipItemTable.EquipItemData, 0);
         SetActive((Enum)UI.BTN_ATTACH, false);
         SetActive((Enum)UI.BTN_DETACH, false);
         SetActive((Enum)UI.BTN_GROW, false);
     }
     else if (callSection == ItemDetailEquip.CURRENT_SECTION.SMITH_EVOLVE)
     {
         EquipItemAndSkillData equipItemAndSkillData = eventData as EquipItemAndSkillData;
         equipData       = equipItemAndSkillData.equipItemInfo.tableData;
         slotData        = equipItemAndSkillData.skillSlotUIData;
         isSkillUniqItem = true;
         SetActive((Enum)UI.BTN_ATTACH, false);
         SetActive((Enum)UI.BTN_DETACH, false);
         SetActive((Enum)UI.BTN_GROW, false);
     }
     else if (callSection == ItemDetailEquip.CURRENT_SECTION.QUEST_ROOM)
     {
         equipData       = (eventData as EquipItemInfo);
         slotData        = GetSkillSlotData(eventData as EquipItemInfo);
         isSkillUniqItem = true;
         SetActive((Enum)UI.BTN_ATTACH, false);
         SetActive((Enum)UI.BTN_DETACH, false);
         SetActive((Enum)UI.BTN_GROW, false);
     }
     else if (callSection == ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT)
     {
         EquipItemAndSkillData equipItemAndSkillData2 = eventData as EquipItemAndSkillData;
         equipData       = equipItemAndSkillData2.equipItemInfo;
         slotData        = equipItemAndSkillData2.skillSlotUIData;
         isSkillUniqItem = true;
         SetActive((Enum)UI.BTN_ATTACH, false);
         SetActive((Enum)UI.BTN_DETACH, false);
         SetActive((Enum)UI.BTN_GROW, false);
     }
     else
     {
         equipData       = (eventData as EquipItemInfo);
         slotData        = GetSkillSlotData(eventData as EquipItemInfo);
         isSkillUniqItem = true;
         SetActive((Enum)UI.BTN_ATTACH, true);
         SetActive((Enum)UI.BTN_DETACH, true);
         SetActive((Enum)UI.BTN_GROW, true);
         lookOnly = false;
     }
     SetToggle((Enum)UI.TGL_WINDOW_TITLE, lookOnly);
     if (slotData != null)
     {
         Transform table_item = null;
         SetTable(UI.TBL_SKILL_LIST, "EquipSetDetailTopItem", 1, false, delegate(int i, Transform t, bool is_recycle)
         {
             //IL_01c8: Unknown result type (might be due to invalid IL or missing references)
             //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
             //IL_01eb: Unknown result type (might be due to invalid IL or missing references)
             //IL_01f0: Unknown result type (might be due to invalid IL or missing references)
             //IL_020c: Unknown result type (might be due to invalid IL or missing references)
             //IL_0211: Unknown result type (might be due to invalid IL or missing references)
             //IL_022f: Unknown result type (might be due to invalid IL or missing references)
             //IL_0234: Unknown result type (might be due to invalid IL or missing references)
             //IL_025a: Unknown result type (might be due to invalid IL or missing references)
             table_item = t;
             EquipItemTable.EquipItemData table = null;
             int num  = 1;
             int num2 = 0;
             if (callSection == ItemDetailEquip.CURRENT_SECTION.SMITH_CREATE || callSection == ItemDetailEquip.CURRENT_SECTION.SMITH_EVOLVE || callSection == ItemDetailEquip.CURRENT_SECTION.EQUIP_LIST)
             {
                 table = (equipData as EquipItemTable.EquipItemData);
             }
             else
             {
                 EquipItemInfo equipItemInfo = equipData as EquipItemInfo;
                 table = equipItemInfo.tableData;
                 num   = equipItemInfo.level;
                 num2  = equipItemInfo.exceed;
             }
             ItemIcon itemIcon = ItemIcon.CreateEquipItemIconByEquipItemTable(table, sex, FindCtrl(t, UI.OBJ_ICON_ROOT), null, -1, null, 0, false, -1, false, null, false, false);
             itemIcon.SetEnableCollider(false);
             SetActive(t, UI.SPR_EQUIP_INDEX_ICON, false);
             string name = table.name;
             name        = Utility.TrimText(name, GetCtrl(UI.LBL_EQUIP_NAME).GetComponent <UILabel>());
             SetLabelText(t, UI.LBL_EQUIP_NAME, name);
             SetLabelText(t, UI.LBL_EQUIP_NOW_LV, num.ToString());
             SetLabelText(t, UI.LBL_EQUIP_MAX_LV, table.maxLv.ToString());
             SetGrid(t, UI.GRD_ATTACH_SKILL, "EquipSetDetailTopItem2", slotData.Length, true, delegate(int i2, Transform t2, bool is_recycle2)
             {
                 SkillItemInfo skillItemInfo = slotData[i2].itemData;
                 bool flag = skillItemInfo != null && skillItemInfo.tableData.type == slotData[i2].slotData.slotType;
                 SetSkillIcon(t2, UI.TEX_SKILL_ICON, slotData[i2].slotData.slotType, flag, false);
                 SetEvent(t2, (!flag) ? "SLOT" : "SLOT_DETAIL", i2);
                 SetLongTouch(t2, "SLOT_DETAIL", i2);
                 if (!flag)
                 {
                     skillItemInfo = null;
                 }
                 SetToggle(t2, UI.TGL_ACTIVE_OBJ, skillItemInfo != null);
                 SetActive(t2, UI.LBL_NAME, true);
                 SetActive(t2, UI.LBL_NAME_NOT_ENABLE_TYPE, false);
                 if (skillItemInfo == null)
                 {
                     SetLabelText(t2, UI.LBL_NAME, base.sectionData.GetText("EMPTY_SLOT"));
                     SetActive(t2, UI.SPR_ENABLE_WEAPON_TYPE, false);
                 }
                 else
                 {
                     SkillItemTable.SkillItemData tableData = skillItemInfo.tableData;
                     SetLabelText(t2, UI.LBL_NAME, tableData.name);
                     SetLabelText(t2, UI.LBL_NAME_NOT_ENABLE_TYPE, tableData.name);
                     SetLabelText(t2, UI.LBL_NOW_LV, skillItemInfo.level.ToString());
                     SetLabelText(t2, UI.LBL_MAX_LV, skillItemInfo.tableData.GetMaxLv(skillItemInfo.exceedCnt).ToString());
                     SetActive(t2, UI.LBL_EX_LV, skillItemInfo.IsExceeded());
                     SetLabelText(t2, UI.LBL_EX_LV, StringTable.Format(STRING_CATEGORY.SMITH, 9u, skillItemInfo.exceedCnt));
                     EQUIPMENT_TYPE?enableEquipType = skillItemInfo.tableData.GetEnableEquipType();
                     SetActive(t2, UI.SPR_ENABLE_WEAPON_TYPE, enableEquipType.HasValue);
                     if (enableEquipType.HasValue)
                     {
                         bool flag2 = enableEquipType.Value == table.type;
                         SetSkillEquipIconKind(t2, UI.SPR_ENABLE_WEAPON_TYPE, enableEquipType.Value, flag2);
                         SetActive(t2, UI.LBL_NAME, flag2);
                         SetActive(t2, UI.LBL_NAME_NOT_ENABLE_TYPE, !flag2);
                     }
                 }
             });
             base.GetComponent <UITable>(t, (Enum)UI.TBL_SPACE).Reposition();
             Vector3 localPosition = t.get_localPosition();
             float y = localPosition.y;
             Vector3 localPosition2 = FindCtrl(t, UI.OBJ_SPACE).get_localPosition();
             float y2 = localPosition2.y;
             Vector3 localPosition3 = FindCtrl(t, UI.TBL_SPACE).get_localPosition();
             float num3             = y2 + localPosition3.y;
             Vector3 localPosition4 = FindCtrl(t, UI.SPR_EQUIP_INDEX_ICON).get_localPosition();
             localPosition4.y       = (num3 - y) * 0.5f;
             FindCtrl(t, UI.SPR_EQUIP_INDEX_ICON).set_localPosition(localPosition4);
         });
         Transform val  = FindCtrl(table_item, UI.OBJ_SPACE_COLLISION);
         Transform ctrl = GetCtrl(UI.OBJ_ANCHOR_BOTTOM);
         if (val != null && ctrl != null)
         {
             UpdateAnchors();
             ctrl.set_position(val.get_position());
             UpdateAnchors();
         }
     }
 }
Ejemplo n.º 23
0
    public static void GetIconShowData(REWARD_TYPE reward_type, uint id, out int icon_id, out ITEM_ICON_TYPE icon_type, out RARITY_TYPE?rarity, out ELEMENT_TYPE element, out EQUIPMENT_TYPE?magi_enable_icon_type, out int enemy_icon_id, out int enemy_icon_id2, out GET_TYPE getType, int exceed_cnt = 0)
    {
        icon_type             = ITEM_ICON_TYPE.NONE;
        icon_id               = -1;
        rarity                = null;
        element               = ELEMENT_TYPE.MAX;
        magi_enable_icon_type = null;
        enemy_icon_id         = 0;
        enemy_icon_id2        = 0;
        getType               = GET_TYPE.PAY;
        switch (reward_type)
        {
        case REWARD_TYPE.CRYSTAL:
            icon_id   = 1;
            icon_type = ITEM_ICON_TYPE.CRYSTAL;
            break;

        case REWARD_TYPE.MONEY:
            icon_id = 2;
            break;

        case REWARD_TYPE.EXP:
            icon_id = 3;
            break;

        case REWARD_TYPE.ITEM:
        case REWARD_TYPE.ABILITY_ITEM:
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(id);

            if (itemData != null)
            {
                icon_type      = ((itemData.type != ITEM_TYPE.USE_ITEM) ? ITEM_ICON_TYPE.ITEM : ITEM_ICON_TYPE.USE_ITEM);
                icon_id        = itemData.iconID;
                rarity         = itemData.rarity;
                enemy_icon_id  = itemData.enemyIconID;
                enemy_icon_id2 = itemData.enemyIconID2;
            }
            break;
        }

        case REWARD_TYPE.EQUIP_ITEM:
        {
            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(id);

            if (equipItemData != null)
            {
                icon_type = GetItemIconType(equipItemData.type);
                icon_id   = equipItemData.GetIconID(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex);
                rarity    = equipItemData.rarity;
                element   = equipItemData.GetTargetElementPriorityToTable();
                getType   = equipItemData.getType;
            }
            break;
        }

        case REWARD_TYPE.SKILL_ITEM:
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(id);

            if (skillItemData != null)
            {
                icon_type             = GetItemIconType(skillItemData.type);
                icon_id               = skillItemData.iconID;
                rarity                = skillItemData.rarity;
                element               = skillItemData.skillAtkType;
                magi_enable_icon_type = skillItemData.GetEnableEquipType();
            }
            break;
        }

        case REWARD_TYPE.QUEST_ITEM:
        {
            QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(id);

            if (questData != null)
            {
                icon_type = GetItemIconType(questData.questType);
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

                icon_id = enemyData.iconId;
                rarity  = questData.rarity;
                element = enemyData.element;
            }
            break;
        }

        case REWARD_TYPE.AVATAR:
        case REWARD_TYPE.COMMON:
            icon_type = ITEM_ICON_TYPE.COMMON;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.STAMP:
            icon_type = ITEM_ICON_TYPE.STAMP;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.DEGREE:
            icon_type = ITEM_ICON_TYPE.DEGREE;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.POINT_SHOP_POINT:
            icon_type = ITEM_ICON_TYPE.POINT_SHOP_ICON;
            icon_id   = (int)id;
            break;
        }
    }
    public override void UpdateUI()
    {
        base.UpdateUI();
        if (iconData != null)
        {
            if (iconData is ItemSortData)
            {
                SetActive((Enum)UI.OBJ_EQUIP, false);
                SetActive((Enum)UI.OBJ_ITEM, true);
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, iconData.GetName());
                SetLabelText((Enum)UI.LBL_TEXT, itemData.text);
            }
            else if (iconData is EquipItemSortData)
            {
                SetActive((Enum)UI.OBJ_EQUIP, true);
                SetActive((Enum)UI.OBJ_ITEM, false);
                EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, equipItemData.name);
                SetLabelText((Enum)UI.LBL_ATK, equipItemData.baseAtk.ToString());
                SetLabelText((Enum)UI.LBL_DEF, equipItemData.baseDef.ToString());
                int  fixedSkillLength = equipItemData.fixedSkillLength;
                UI[] array            = new UI[3]
                {
                    UI.LBL_SKILL_A,
                    UI.LBL_SKILL_B,
                    UI.LBL_SKILL_C
                };
                for (int i = 0; i < 3; i++)
                {
                    if (i < fixedSkillLength)
                    {
                        SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(equipItemData.GetSkillSlot(0)[i].skill_id);

                        if (skillItemData != null)
                        {
                            SetActive((Enum)array[i], true);
                            SetLabelText((Enum)array[i], skillItemData.name);
                        }
                        else
                        {
                            SetActive((Enum)array[i], false);
                        }
                    }
                    else
                    {
                        SetActive((Enum)array[i], false);
                    }
                }
            }
            else
            {
                SetActive((Enum)UI.OBJ_EQUIP, true);
                SetActive((Enum)UI.OBJ_ITEM, false);
                SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, skillItemData2.name);
                SetLabelText((Enum)UI.LBL_ATK, skillItemData2.baseAtk.ToString());
                SetLabelText((Enum)UI.LBL_DEF, skillItemData2.baseDef.ToString());
                SetLabelText((Enum)UI.LBL_SKILL_A, string.Empty);
                SetLabelText((Enum)UI.LBL_SKILL_B, string.Empty);
                SetLabelText((Enum)UI.LBL_SKILL_C, string.Empty);
            }
        }
    }
Ejemplo n.º 25
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);
    }
Ejemplo n.º 26
0
    private static string GetStatusText(EXPLANATION_COMMAND cmd, SkillItemTable.SkillItemData table_data, GrowSkillItemTable.GrowSkillItemData grow_data, int level)
    {
        switch (cmd)
        {
        case EXPLANATION_COMMAND.ATK:
            return((level <= 1) ? table_data.baseAtk.ToString() : grow_data.GetGrowParamAtk(table_data.baseAtk).ToString());

        case EXPLANATION_COMMAND.DEF:
            return((level <= 1) ? table_data.baseDef.ToString() : grow_data.GetGrowParamDef(table_data.baseDef).ToString());

        case EXPLANATION_COMMAND.HP:
            return((level <= 1) ? table_data.baseHp.ToString() : grow_data.GetGrowParamHp(table_data.baseHp).ToString());

        case EXPLANATION_COMMAND.FIRE_ATK:
            return((level <= 1) ? table_data.atkElement[0].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[0].ToString());

        case EXPLANATION_COMMAND.WATER_ATK:
            return((level <= 1) ? table_data.atkElement[1].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[1].ToString());

        case EXPLANATION_COMMAND.THUNDER_ATK:
            return((level <= 1) ? table_data.atkElement[2].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[2].ToString());

        case EXPLANATION_COMMAND.SOIL_ATK:
            return((level <= 1) ? table_data.atkElement[3].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[3].ToString());

        case EXPLANATION_COMMAND.LIGHR_ATK:
            return((level <= 1) ? table_data.atkElement[4].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[4].ToString());

        case EXPLANATION_COMMAND.DARK_ATK:
            return((level <= 1) ? table_data.atkElement[5].ToString() : grow_data.GetGrowParamElemAtk(table_data.atkElement)[5].ToString());

        case EXPLANATION_COMMAND.FIRE_DEF:
            return((level <= 1) ? table_data.defElement[0].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[0].ToString());

        case EXPLANATION_COMMAND.WATER_DEF:
            return((level <= 1) ? table_data.defElement[1].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[1].ToString());

        case EXPLANATION_COMMAND.THUNDER_DEF:
            return((level <= 1) ? table_data.defElement[2].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[2].ToString());

        case EXPLANATION_COMMAND.SOIL_DEF:
            return((level <= 1) ? table_data.defElement[3].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[3].ToString());

        case EXPLANATION_COMMAND.LIGHR_DEF:
            return((level <= 1) ? table_data.defElement[4].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[4].ToString());

        case EXPLANATION_COMMAND.DARK_DEF:
            return((level <= 1) ? table_data.defElement[5].ToString() : grow_data.GetGrowParamElemDef(table_data.defElement)[5].ToString());

        case EXPLANATION_COMMAND.SKILL_ATK:
        {
            int num2 = (level <= 1) ? ((int)table_data.skillAtk) : grow_data.GetGrowParamSkillAtk(table_data.skillAtk);
            num2 = Mathf.FloorToInt((float)num2 * MonoBehaviourSingleton <GlobalSettingsManager> .I.skillItem.explanationAtkDispRate);
            return(num2.ToString());
        }

        case EXPLANATION_COMMAND.SKILL_ATKRATE:
        {
            int num = (level <= 1) ? ((int)table_data.skillAtkRate) : grow_data.GetGrowParamSkillAtkRate(table_data.skillAtkRate);
            return(Mathf.FloorToInt((float)num * MonoBehaviourSingleton <GlobalSettingsManager> .I.skillItem.explanationAtkRateDispRate).ToString());
        }

        case EXPLANATION_COMMAND.HEAL_HP:
            return((level <= 1) ? table_data.healHp.ToString() : grow_data.GetGrowParamHealHp(table_data.healHp).ToString());

        case EXPLANATION_COMMAND.SUPPORT_VALUE_1:
            return((level <= 1) ? table_data.supportValue[0].ToString() : grow_data.GetGrowParamSupprtValue(table_data.supportValue, 0).ToString());

        case EXPLANATION_COMMAND.SUPPORT_VALUE_2:
            return((level <= 1) ? table_data.supportValue[1].ToString() : grow_data.GetGrowParamSupprtValue(table_data.supportValue, 1).ToString());

        case EXPLANATION_COMMAND.SUPPORT_VALUE_3:
            return((level <= 1) ? table_data.supportValue[2].ToString() : grow_data.GetGrowParamSupprtValue(table_data.supportValue, 2).ToString());

        case EXPLANATION_COMMAND.SUPPORT_TIME_1:
            return((level <= 1) ? table_data.supportTime[0].ToString() : grow_data.GetGrowParamSupprtTime(table_data.supportTime, 0).ToString());

        case EXPLANATION_COMMAND.SUPPORT_TIME_2:
            return((level <= 1) ? table_data.supportTime[1].ToString() : grow_data.GetGrowParamSupprtTime(table_data.supportTime, 1).ToString());

        case EXPLANATION_COMMAND.SUPPORT_TIME_3:
            return((level <= 1) ? table_data.supportTime[2].ToString() : grow_data.GetGrowParamSupprtTime(table_data.supportTime, 2).ToString());

        default:
            Log.Error("explanation command unsupported {0}", EXPLANATION_COMMAND_LIST[(int)cmd]);
            return(EXPLANATION_COMMAND_LIST[(int)cmd]);
        }
    }
Ejemplo n.º 27
0
    public static string GetExplanationStatusUpText(SkillItemTable.SkillItemData table_data, int level, string status_up_format)
    {
        GrowSkillItemTable.GrowSkillItemData grow_data = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(table_data.growID, level);

        return(GetExplanationStatusUpText(table_data.text, status_up_format, (EXPLANATION_COMMAND cmd) => GetStatusText(cmd, table_data, grow_data, level)));
    }
    private IEnumerator DoSkillGacha()
    {
        Transform _transform = this.get_transform();

        Reset();
        if (line != null)
        {
            line.set_enabled(true);
        }
        isReam = false;
        if (MonoBehaviourSingleton <GachaManager> .IsValid() && MonoBehaviourSingleton <GachaManager> .I.IsReam())
        {
            isReam = true;
        }
        SetActivateBasketCollider(true);
        Vector3 basket_pos = basket.get_position();

        for (int l = 0; l < 20; l++)
        {
            CreateBall(_transform, 0, basket_pos + Quaternion.AngleAxis((float)(l * 45), Vector3.get_right()) * new Vector3(0.04f * (float)(l - 10), 0.08f, 0f), false);
        }
        LoadingQueue load_queue = new LoadingQueue(this);

        if (isReam)
        {
            int k = 0;
            for (int j = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count; k < j; k++)
            {
                GachaResult.GachaReward      rwd             = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[k];
                SkillItemTable.SkillItemData skill_item_data = Singleton <SkillItemTable> .I.GetSkillItemData((uint)rwd.itemId);

                if (skill_item_data != null)
                {
                    load_queue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(skill_item_data.modelID), false);
                    load_queue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemSymbolModel(skill_item_data.iconID), false);
                }
            }
            List <GachaResult.GachaReward> rewards = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward;
            if (ballsRen != null)
            {
                for (int i = 0; i < ballsRen.Length; i++)
                {
                    if (i < rewards.Count)
                    {
                        GachaResult.GachaReward      rwd2             = rewards[i];
                        SkillItemTable.SkillItemData skill_item_data2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)rwd2.itemId);

                        if (skill_item_data2 != null)
                        {
                            MeshRenderer mr       = ballsRen[i].GetComponent <MeshRenderer>();
                            int          index    = skill_item_data2.rarity.ToRarityExpressionID();
                            MeshRenderer rareBall = balls[index].GetComponent <MeshRenderer>();
                            mr.set_sharedMaterial(rareBall.get_sharedMaterial());
                        }
                    }
                }
            }
        }
        int[] se_id_list = (int[])Enum.GetValues(typeof(AUDIO));
        int[] array      = se_id_list;
        foreach (int id in array)
        {
            load_queue.CacheSE(id, null);
        }
        LoadingQueue loadQueue = new LoadingQueue(this);

        for (int tx = 0; tx < 3; tx++)
        {
            LoadObject loadObj = loadQueue.Load(RESOURCE_CATEGORY.MAGI_BASKET_MODEL_TEX, ResourceName.GetMagiGachaModelTexutre(2 + tx), false);
            while (loadQueue.IsLoading())
            {
                yield return((object)loadQueue.Wait());
            }
            basketModelTextureList[tx] = loadObj.loadedObject;
        }
        if (backupBasketModelTexture != null)
        {
            Material mat = GetMaterial(basket);
            if (mat != null)
            {
                mat.set_mainTexture(backupBasketModelTexture);
                mat.SetColor("_SpeLightColor", backupBasketSpeColor);
            }
        }
        yield return((object)new WaitForSeconds(1f));

        npcModel = Utility.CreateGameObject("NPC", this.get_transform().get_parent(), -1);
        managedObjects.Add(npcModel.get_gameObject());
        NPCLoader npc_loader = npcModel.get_gameObject().AddComponent <NPCLoader>();

        npc_loader.Load(Singleton <NPCTable> .I.GetNPCData(1).npcModelID, 0, false, true, SHADER_TYPE.NORMAL, null);
        while (npc_loader.isLoading)
        {
            yield return((object)null);
        }
        if (load_queue != null && load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        npcAnimator = npc_loader.animator;
        yield return((object)null);

        m_isFinishLoad = true;
        npcAnimator.set_cullingMode(0);
        npcAnimator.Rebind();
        npcAnimator.set_cullingMode(0);
        gachaAnimator.Rebind();
        cameraAnimator.set_cullingMode(0);
        cameraAnimator.Rebind();
        string anim_name = (!IsSingleGacha) ? "SKILL_GACHA_REAM" : "SKILL_GACHA_SINGLE";

        dropCount = 0;
        Drop();
        Play(anim_name, null, 0f);
        if (isReam)
        {
            while (dropCount < 11)
            {
                if (skip && IsFinishDrop10())
                {
                    if (MonoBehaviourSingleton <TransitionManager> .I.isChanging)
                    {
                        yield return((object)null);
                    }
                    Time.set_timeScale(1f);
                    skip = false;
                    yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In());
                }
                yield return((object)null);
            }
        }
        while (mainBall.get_gameObject().get_activeSelf())
        {
            yield return((object)null);
        }
        if (skip)
        {
            yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In());

            Time.set_timeScale(1f);
        }
        yield return((object)null);

        sectionCommandReceiver.OnEnd();
        coroutine = null;
    }
Ejemplo n.º 29
0
 public void UpdateTableData()
 {
     tableData = Singleton <SkillItemTable> .I.GetSkillItemData(base.tableID);
 }
Ejemplo n.º 30
0
    public void Parse(CharaInfo.EquipItem item, EquipItemTable.EquipItemData data)
    {
        _Reset();
        type         = data.type;
        spAttackType = data.spAttackType;
        GrowEquipItemTable.GrowEquipItemData growEquipItemData = Singleton <GrowEquipItemTable> .I.GetGrowEquipItemData(data.growID, (uint)item.lv);

        if (object.ReferenceEquals(growEquipItemData, null))
        {
            baseStatus.hp          = data.baseHp;
            baseStatus.attacks[0]  = data.baseAtk;
            baseStatus.defences[0] = data.baseDef;
            for (int i = 0; i < 6; i++)
            {
                baseStatus.attacks[i + 1] = data.atkElement[i];
                baseStatus.tolerances[i]  = data.defElement[i];
            }
        }
        else
        {
            baseStatus.hp          = growEquipItemData.GetGrowParamHp(data.baseHp);
            baseStatus.attacks[0]  = growEquipItemData.GetGrowParamAtk(data.baseAtk);
            baseStatus.defences[0] = growEquipItemData.GetGrowParamDef(data.baseDef);
            int[] growParamElemAtk = growEquipItemData.GetGrowParamElemAtk(data.atkElement);
            int[] growParamElemDef = growEquipItemData.GetGrowParamElemDef(data.defElement);
            for (int j = 0; j < 6; j++)
            {
                baseStatus.attacks[j + 1] = growParamElemAtk[j];
                baseStatus.tolerances[j]  = growParamElemDef[j];
            }
        }
        EquipItemExceedParamTable.EquipItemExceedParamAll exceedParam = data.GetExceedParam((uint)item.exceed);
        if (!object.ReferenceEquals(exceedParam, null))
        {
            baseStatus.hp          += exceedParam.hp;
            baseStatus.attacks[0]  += exceedParam.atk;
            baseStatus.defences[0] += exceedParam.def;
            for (int k = 0; k < 6; k++)
            {
                baseStatus.attacks[k + 1] += exceedParam.atkElement[k];
                baseStatus.tolerances[k]  += exceedParam.defElement[k];
            }
        }
        int l = 0;

        for (int count = item.sIds.Count; l < count; l++)
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)item.sIds[l]);

            GrowSkillItemTable.GrowSkillItemData growSkillItemData = Singleton <GrowSkillItemTable> .I.GetGrowSkillItemData(skillItemData.growID, item.sLvs[l]);

            constHp      += growSkillItemData.GetGrowParamHp(skillItemData.baseHp);
            constAtks[0] += growSkillItemData.GetGrowParamAtk(skillItemData.baseAtk);
            constDefs[0] += growSkillItemData.GetGrowParamDef(skillItemData.baseDef);
            int[] growParamElemAtk2 = growSkillItemData.GetGrowParamElemAtk(skillItemData.atkElement);
            int[] growParamElemDef2 = growSkillItemData.GetGrowParamElemDef(skillItemData.defElement);
            for (int m = 0; m < 6; m++)
            {
                constAtks[m + 1] += growParamElemAtk2[m];
                constTols[m]     += growParamElemDef2[m];
            }
            if (skillItemData.IsPassive())
            {
                int n = 0;
                for (int num = skillItemData.supportType.Length; n < num; n++)
                {
                    if (skillItemData.supportType[n] != BuffParam.BUFFTYPE.NONE)
                    {
                        skillSupport.Add(new SkillSupport(skillItemData.supportPassiveEqType[n], skillItemData.supportType[n], growSkillItemData.GetGrowParamSupprtValue(skillItemData.supportValue, n), skillItemData.supportPassiveSpAttackType));
                    }
                }
            }
        }
        int num2 = 0;

        for (int count2 = item.aIds.Count; num2 < count2; num2++)
        {
            int num3 = item.aIds[num2];
            int num4 = item.aPts[num2];
            if (this.ability.ContainsKey(num3))
            {
                Dictionary <int, int> dictionary;
                Dictionary <int, int> dictionary2 = dictionary = this.ability;
                int key;
                int key2 = key = num3;
                key = dictionary[key];
                dictionary2[key2] = key + num4;
            }
            else
            {
                this.ability.Add(num3, num4);
            }
        }
        int num5 = 0;

        for (int num6 = data.fixedAbility.Length; num5 < num6; num5++)
        {
            EquipItem.Ability ability = data.fixedAbility[num5];
            if (this.ability.ContainsKey(ability.id))
            {
                Dictionary <int, int> dictionary3;
                Dictionary <int, int> dictionary4 = dictionary3 = this.ability;
                int key;
                int key3 = key = ability.id;
                key = dictionary3[key];
                dictionary4[key3] = key + ability.pt;
            }
            else
            {
                this.ability.Add(ability.id, ability.pt);
            }
        }
        if (!object.ReferenceEquals(exceedParam, null))
        {
            int num7 = 0;
            for (int num8 = exceedParam.ability.Length; num7 < num8; num7++)
            {
                EquipItem.Ability ability2 = exceedParam.ability[num7];
                if (this.ability.ContainsKey(ability2.id))
                {
                    Dictionary <int, int> dictionary5;
                    Dictionary <int, int> dictionary6 = dictionary5 = this.ability;
                    int key;
                    int key4 = key = ability2.id;
                    key = dictionary5[key];
                    dictionary6[key4] = key + ability2.pt;
                }
                else
                {
                    this.ability.Add(ability2.id, ability2.pt);
                }
            }
        }
    }