Example #1
0
 public EquipItemExceedParam()
 {
     atk        = 0;
     def        = 0;
     hp         = 0;
     atkElement = new int[6];
     defElement = new int[6];
     for (int i = 0; i < 6; i++)
     {
         atkElement[i] = 0;
         defElement[i] = 0;
     }
     skillSlot          = new SkillItemTable.SkillSlotData();
     skillSlot.slotType = SKILL_SLOT_TYPE.NONE;
     skillSlot.skill_id = 0u;
     ability            = new EquipItem.Ability();
     ability.id         = 0;
     ability.pt         = 0;
 }
Example #2
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];
                            }
                        }
                    }
                }
            }
        }
    protected virtual void OnQuery_StatusMigrationSkillConfirm_YES()
    {
        //IL_0175: Unknown result type (might be due to invalid IL or missing references)
        List <SkillItemInfo>      list  = new List <SkillItemInfo>();
        List <MigrationSkillData> list2 = new List <MigrationSkillData>();

        for (int i = 0; i < migrationOldItem.GetMaxSlot(); i++)
        {
            bool          flag      = false;
            SkillItemInfo skillItem = migrationOldItem.GetSkillItem(i, MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo());
            if (skillItem != null)
            {
                for (int j = 0; j < migrationSelectItem.GetMaxSlot(); j++)
                {
                    SkillItemTable.SkillSlotData skillSlotData = migrationSelectItem.tableData.GetSkillSlot(migrationSelectItem.exceed)[j];
                    if (skillSlotData != null && skillSlotData.slotType == skillItem.tableData.type)
                    {
                        int toSlot = j;
                        if (migrationSelectItem.IsExceedSkillSlot(j))
                        {
                            toSlot = migrationSelectItem.GetExceedSkillSlotNo(j);
                        }
                        if (list2.All((MigrationSkillData x) => x.toSlotNo != toSlot))
                        {
                            MigrationSkillData item = new MigrationSkillData(migrationSelectItem.uniqueID, toSlot, skillItem);
                            list2.Add(item);
                            flag = true;
                            break;
                        }
                    }
                }
                if (!flag)
                {
                    list.Add(skillItem);
                }
            }
        }
        migrationSendCount = list2.Count + list.Count;
        GameSection.SetEventData(new ChangeEquipData(selectEquipSetData.setNo, selectEquipSetData.index, migrationSelectItem));
        GameSection.StayEvent();
        this.StartCoroutine(SendReplacementSkill(list2, list));
    }
Example #4
0
        public SkillItemTable.SkillSlotData[] GetSkillSlot(int exceed_cnt)
        {
            int num = _skillSlot.Length;

            SkillItemTable.SkillSlotData[] array = new SkillItemTable.SkillSlotData[num];
            for (int i = 0; i < num; i++)
            {
                array[i] = _skillSlot[i];
            }
            EquipItemExceedParamTable.EquipItemExceedParamAll equipItemExceedParamAll = Singleton <EquipItemExceedParamTable> .I.GetEquipItemExceedParamAll(exceedID, (uint)exceed_cnt);

            if (equipItemExceedParamAll != null && equipItemExceedParamAll.skillSlot.Length > 0)
            {
                Array.Resize(ref array, num + equipItemExceedParamAll.skillSlot.Length);
                for (int j = 0; j < equipItemExceedParamAll.skillSlot.Length; j++)
                {
                    array[num + j] = equipItemExceedParamAll.skillSlot[j];
                }
            }
            return(array);
        }
Example #5
0
        public static bool cb(CSVReader csv_reader, EquipItemData data, ref uint key)
        {
            //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
            //IL_013c: Unknown result type (might be due to invalid IL or missing references)
            //IL_015b: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d7: Unknown result type (might be due to invalid IL or missing references)
            data.id = key;
            csv_reader.Pop(ref data.appVer);
            csv_reader.Pop(ref data.type);
            csv_reader.Pop(ref data.getType);
            csv_reader.Pop(ref data.eventId);
            csv_reader.Pop(ref data.name);
            csv_reader.Pop(ref data.rarity);
            csv_reader.Pop(ref data.modelID0);
            data.modelID1 = data.modelID0;
            csv_reader.Pop(ref data.modelID1);
            string value = string.Empty;
            int    num   = -1;

            csv_reader.Pop(ref value);
            if (value.Length > 1)
            {
                num = (int)Enum.Parse(typeof(ELEMENT_TYPE), value);
            }
            if (!(bool)csv_reader.PopColor24(ref data.modelColor0))
            {
                if (num != -1)
                {
                    data.modelColor0 = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.GetModelElementColor(num));
                }
                else
                {
                    data.modelColor0 = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.modelBaseColor);
                }
            }
            csv_reader.PopColor24(ref data.modelColor1);
            if (!(bool)csv_reader.PopColor24(ref data.modelColor2))
            {
                if (num != -1)
                {
                    data.modelColor2 = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.GetModelElementColor2(num));
                }
                else
                {
                    data.modelColor2 = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.modelBaseColor2);
                }
            }
            csv_reader.Pop(ref data.effectID);
            data.effectParam = 1f;
            csv_reader.Pop(ref data.effectParam);
            if (!(bool)csv_reader.PopColor24(ref data.effectColor))
            {
                if (num != -1)
                {
                    data.effectColor = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.GetModelElementColor(num));
                }
                else
                {
                    data.effectColor = NGUIMath.ColorToInt(MonoBehaviourSingleton <GlobalSettingsManager> .I.playerVisual.modelBaseColor);
                }
            }
            csv_reader.Pop(ref data.__iconID);
            csv_reader.Pop(ref data.maxLv);
            csv_reader.Pop(ref data.growID);
            csv_reader.Pop(ref data.needId);
            csv_reader.Pop(ref data.needUniqueId);
            csv_reader.Pop(ref data.exceedID);
            csv_reader.Pop(ref data.shadowEvolveEquipItemId);
            csv_reader.Pop(ref data.baseAtk);
            csv_reader.Pop(ref data.baseDef);
            csv_reader.Pop(ref data.baseHp);
            data.atkElement = new int[6];
            data.defElement = new int[6];
            for (int i = 0; i < 6; i++)
            {
                csv_reader.Pop(ref data.atkElement[i]);
            }
            for (int j = 0; j < 6; j++)
            {
                csv_reader.Pop(ref data.defElement[j]);
            }
            List <SkillItemTable.SkillSlotData> list = new List <SkillItemTable.SkillSlotData>();
            int num2 = 0;
            int num3 = 0;

            for (int k = 0; k < 9; k++)
            {
                string value2 = string.Empty;
                uint   value3 = 0u;
                csv_reader.Pop(ref value2);
                csv_reader.Pop(ref value3);
                if (!string.IsNullOrEmpty(value2))
                {
                    SkillItemTable.SkillSlotData skillSlotData = new SkillItemTable.SkillSlotData();
                    skillSlotData.slotType = (SKILL_SLOT_TYPE)(int)Enum.Parse(typeof(SKILL_SLOT_TYPE), value2);
                    if (skillSlotData.slotType != 0)
                    {
                        skillSlotData.skill_id = value3;
                        list.Add(skillSlotData);
                        num3++;
                        if (value3 != 0)
                        {
                            num2++;
                        }
                    }
                }
            }
            data._skillSlot       = list.ToArray();
            data.fixedSkillLength = num2;
            data.maxSlot          = num3;
            int[] array  = new int[3];
            int[] array2 = new int[3];
            int[] array3 = new int[3];
            int   num4   = 0;

            for (int l = 0; l < 3; l++)
            {
                csv_reader.Pop(ref array[l]);
                csv_reader.Pop(ref array2[l]);
                csv_reader.Pop(ref array3[l]);
                if (array[l] != 0 && array2[l] != 0)
                {
                    num4++;
                }
            }
            data.fixedAbility = new EquipItem.Ability[num4];
            for (int m = 0; m < num4; m++)
            {
                data.fixedAbility[m]    = new EquipItem.Ability();
                data.fixedAbility[m].id = array[m];
                data.fixedAbility[m].pt = array2[m];
                data.fixedAbility[m].vr = (0 < array3[m]);
            }
            csv_reader.Pop(ref data.sale);
            csv_reader.Pop(ref data.listId);
            string value4 = string.Empty;

            csv_reader.Pop(ref value4);
            data.obtained = new Obtained(value4);
            if (!(bool)csv_reader.Pop(ref data.damageDistanceId))
            {
                if (data.type == EQUIPMENT_TYPE.ARROW)
                {
                    data.damageDistanceId = 0;
                }
                else
                {
                    data.damageDistanceId = -1;
                }
            }
            csv_reader.PopEnum(ref data.atkElementType, ELEMENT_TYPE.MAX);
            csv_reader.PopEnum(ref data.defElementType, ELEMENT_TYPE.MAX);
            csv_reader.Pop(ref data.isFormer);
            csv_reader.PopEnum(ref data.spAttackType, SP_ATTACK_TYPE.NONE);
            csv_reader.Pop(ref data.spAttackRate);
            csv_reader.Pop(ref data.evolveId);
            return(true);
        }
    public void UpdateIndex()
    {
        //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
        //IL_0197: Unknown result type (might be due to invalid IL or missing references)
        if (!(target == null) && target.weaponData != null)
        {
            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)target.weaponData.eId);

            if (equipItemData != null)
            {
                SkillItemTable.SkillSlotData[] array = equipItemData.GetSkillSlot(target.weaponData.exceed);
                if (!TutorialStep.IsTheTutorialOver(TUTORIAL_STEP.USER_CREATE_02))
                {
                    array = new SkillItemTable.SkillSlotData[1]
                    {
                        new SkillItemTable.SkillSlotData()
                    };
                    array[0].slotType = SKILL_SLOT_TYPE.ATTACK;
                    array[0].skill_id = 0u;
                }
                int num = 0;
                int i   = 0;
                for (int num2 = array.Length; i < num2; i++)
                {
                    if (array[i].slotType != SKILL_SLOT_TYPE.ATTACK && array[i].slotType != SKILL_SLOT_TYPE.SUPPORT && array[i].slotType != SKILL_SLOT_TYPE.HEAL)
                    {
                        num++;
                    }
                }
                int num3 = 0;
                int j    = array.Length - num;
                for (int count = skillButtons.Count; j < count; j++)
                {
                    skillButtons[num3].get_gameObject().SetActive(false);
                    skillButtons[num3].SetButtonIndex(-1);
                    num3++;
                }
                int num4 = 0;
                int k    = 0;
                for (int num5 = array.Length; k < num5; k++)
                {
                    if (num3 >= skillButtons.Count)
                    {
                        break;
                    }
                    if (array[k].slotType == SKILL_SLOT_TYPE.ATTACK || array[k].slotType == SKILL_SLOT_TYPE.SUPPORT || array[k].slotType == SKILL_SLOT_TYPE.HEAL)
                    {
                        skillButtons[num3].get_gameObject().SetActive(true);
                        SkillInfo.SkillParam skillParam = target.skillInfo.GetSkillParam(target.skillInfo.weaponOffset + num4);
                        if (skillParam != null && skillParam.tableData.type == array[k].slotType)
                        {
                            skillButtons[num3].SetButtonIndex(num4);
                            num4++;
                        }
                        else
                        {
                            skillButtons[num3].SetInActiveSlot(array[k].slotType);
                        }
                        num3++;
                    }
                }
            }
        }
    }