Esempio n. 1
0
        public void SetFromRow(ExDRow row)
        {
            RowKey = row.Key;

            Name        = row.GetDataByIndex(1).GetAsTyped <string>();
            Description = row.GetDataByIndex(2).GetAsTyped <string>();
        }
Esempio n. 2
0
        public Meal(ExDRow row) : base(row)
        {
            var itemFoodValues = Program
                                 .ItemFoods[Program.ItemActions[row.GetDataByIndex(30).GetAsTyped <ushort>()].ItemFoodKey].Values;

            Parameters = new Dictionary <string, ItemFoodValue>();

            foreach (var key in itemFoodValues.Keys)
            {
                Parameters.Add(key, itemFoodValues[key]);
            }
        }
Esempio n. 3
0
        public MateriaItem(ExDRow row) : base(row)
        {
            var materia = Program.Materias[row.Key];

            Tier = materia.Tier;

            Parameters = new Dictionary <string, short>();

            foreach (var key in materia.Parameters.Keys)
            {
                Parameters.Add(key, materia.Parameters[key]);
            }
        }
Esempio n. 4
0
        public static IEnumerable <Materia> CreateMateriasFromRow(ExDRow row)
        {
            var baseParamName = Program.BaseParams[row.GetDataByIndex(10).GetAsTyped <byte>()].Name;

            var materias = new List <Materia>();

            for (var i = 0; i < 10; i++)
            {
                var materia = new Materia(row.GetDataByIndex(i).GetAsTyped <int>(), i + 1);
                materia.Parameters.Add(baseParamName, row.GetDataByIndex(11 + i).GetAsTyped <short>());
                materias.Add(materia);
            }

            return(materias);
        }
 public EquipSlotCategory(ExDRow row)
 {
     RowKey   = row.Key;
     MainHand = row.GetDataByIndex(0).GetAsTyped <sbyte>() > 0;
     OffHand  = row.GetDataByIndex(1).GetAsTyped <sbyte>() > 0;
     Head     = row.GetDataByIndex(2).GetAsTyped <sbyte>() > 0;
     Body     = row.GetDataByIndex(3).GetAsTyped <sbyte>() > 0;
     Gloves   = row.GetDataByIndex(4).GetAsTyped <sbyte>() > 0;
     Waist    = row.GetDataByIndex(5).GetAsTyped <sbyte>() > 0;
     Legs     = row.GetDataByIndex(6).GetAsTyped <sbyte>() > 0;
     Feet     = row.GetDataByIndex(7).GetAsTyped <sbyte>() > 0;
     Ears     = row.GetDataByIndex(8).GetAsTyped <sbyte>() > 0;
     Neck     = row.GetDataByIndex(9).GetAsTyped <sbyte>() > 0;
     Wrists   = row.GetDataByIndex(10).GetAsTyped <sbyte>() > 0;
     Ring     = row.GetDataByIndex(11).GetAsTyped <sbyte>() > 0 || row.GetDataByIndex(12).GetAsTyped <sbyte>() > 0;
 }
Esempio n. 6
0
        public void SetFromRow(ExDRow row)
        {
            RowKey = row.Key;

            Name = row.GetDataByIndex(0).GetAsTyped <string>();
            ADV  = row.GetDataByIndex(1).GetAsTyped <bool>();
            GLA  = row.GetDataByIndex(2).GetAsTyped <bool>();
            PGL  = row.GetDataByIndex(3).GetAsTyped <bool>();
            MRD  = row.GetDataByIndex(4).GetAsTyped <bool>();
            LNC  = row.GetDataByIndex(5).GetAsTyped <bool>();
            ARC  = row.GetDataByIndex(6).GetAsTyped <bool>();
            CNJ  = row.GetDataByIndex(7).GetAsTyped <bool>();
            THM  = row.GetDataByIndex(8).GetAsTyped <bool>();
            CRP  = row.GetDataByIndex(9).GetAsTyped <bool>();
            BSM  = row.GetDataByIndex(10).GetAsTyped <bool>();
            ARM  = row.GetDataByIndex(11).GetAsTyped <bool>();
            GSM  = row.GetDataByIndex(12).GetAsTyped <bool>();
            LTW  = row.GetDataByIndex(13).GetAsTyped <bool>();
            WVR  = row.GetDataByIndex(14).GetAsTyped <bool>();
            ALC  = row.GetDataByIndex(15).GetAsTyped <bool>();
            CUL  = row.GetDataByIndex(16).GetAsTyped <bool>();
            MIN  = row.GetDataByIndex(17).GetAsTyped <bool>();
            BTN  = row.GetDataByIndex(18).GetAsTyped <bool>();
            FSH  = row.GetDataByIndex(19).GetAsTyped <bool>();
            PLD  = row.GetDataByIndex(20).GetAsTyped <bool>();
            MNK  = row.GetDataByIndex(21).GetAsTyped <bool>();
            WAR  = row.GetDataByIndex(22).GetAsTyped <bool>();
            DRG  = row.GetDataByIndex(23).GetAsTyped <bool>();
            BRD  = row.GetDataByIndex(24).GetAsTyped <bool>();
            WHM  = row.GetDataByIndex(25).GetAsTyped <bool>();
            BLM  = row.GetDataByIndex(26).GetAsTyped <bool>();
            ACN  = row.GetDataByIndex(27).GetAsTyped <bool>();
            SMN  = row.GetDataByIndex(28).GetAsTyped <bool>();
            SCH  = row.GetDataByIndex(29).GetAsTyped <bool>();
            ROG  = row.GetDataByIndex(30).GetAsTyped <bool>();
            NIN  = row.GetDataByIndex(31).GetAsTyped <bool>();
            MCH  = row.GetDataByIndex(32).GetAsTyped <bool>();
            DRK  = row.GetDataByIndex(33).GetAsTyped <bool>();
            AST  = row.GetDataByIndex(34).GetAsTyped <bool>();
            SAM  = row.GetDataByIndex(35).GetAsTyped <bool>();
            RDM  = row.GetDataByIndex(36).GetAsTyped <bool>();
            BLU  = row.GetDataByIndex(37).GetAsTyped <bool>();
            GNB  = row.GetDataByIndex(38).GetAsTyped <bool>();
            DNC  = row.GetDataByIndex(39).GetAsTyped <bool>();
        }
        public void SetFromRow(ExDRow row, string languageCode)
        {
            RowKey = row.Key;

            switch (languageCode)
            {
            case "en":
                NameEn = row.GetDataByIndex(9).GetAsTyped <string>();
                break;

            case "ja":
                NameJa = row.GetDataByIndex(9).GetAsTyped <string>();
                break;

            case "ko":
                NameKo = row.GetDataByIndex(9).GetAsTyped <string>();
                break;
            }

            ItemLevel = GetItemLevelFromRow(row);

            ItemUICategory = GetItemUICategoryFromRow(row);

            EquipSlotCategory = Program.memoryContext.EquipSlotCategories.FirstOrDefault(equipSlotCategory => equipSlotCategory.RowKey == row.GetDataByIndex(17).GetAsTyped <byte>());

            CanBeHq = row.GetDataByIndex(27).GetAsTyped <bool>();

            ClassJobCategory = Program.memoryContext.ClassJobCategories.FirstOrDefault(classJobCategory => classJobCategory.RowKey == row.GetDataByIndex(43).GetAsTyped <byte>());

            ParameterValues = new List <ParameterValueModel>();

            for (int i = 0; i < 6; i++)
            {
                ParameterValueModel parameterValue = new ParameterValueModel()
                {
                    BaseParam  = Program.memoryContext.BaseParams.FirstOrDefault(baseParam => baseParam.RowKey == row.GetDataByIndex(59 + i * 2).GetAsTyped <byte>()),
                    ParamValue = row.GetDataByIndex(60 + i * 2).GetAsTyped <short>()
                };

                ParameterValues.Add(parameterValue);
            }

            MateriaSlotCount = row.GetDataByIndex(86).GetAsTyped <byte>();
        }
        public void SetFromRow(ExDRow row)
        {
            RowKey = row.Key;

            MainHand    = row.GetDataByIndex(0).GetAsTyped <sbyte>();
            OffHand     = row.GetDataByIndex(1).GetAsTyped <sbyte>();
            Head        = row.GetDataByIndex(2).GetAsTyped <sbyte>();
            Body        = row.GetDataByIndex(3).GetAsTyped <sbyte>();
            Gloves      = row.GetDataByIndex(4).GetAsTyped <sbyte>();
            Waist       = row.GetDataByIndex(5).GetAsTyped <sbyte>();
            Legs        = row.GetDataByIndex(6).GetAsTyped <sbyte>();
            Feet        = row.GetDataByIndex(7).GetAsTyped <sbyte>();
            Ears        = row.GetDataByIndex(8).GetAsTyped <sbyte>();
            Neck        = row.GetDataByIndex(9).GetAsTyped <sbyte>();
            Wrists      = row.GetDataByIndex(10).GetAsTyped <sbyte>();
            FingerL     = row.GetDataByIndex(11).GetAsTyped <sbyte>();
            FingerR     = row.GetDataByIndex(12).GetAsTyped <sbyte>();
            SoulCrystal = row.GetDataByIndex(13).GetAsTyped <sbyte>();
        }
Esempio n. 9
0
        public Equipment(ExDRow row) : base(row)
        {
            Rarity = row.GetDataByIndex(12).GetAsTyped <byte>();

            CanBeHq = row.GetDataByIndex(27).GetAsTyped <bool>();

            ClassJobCategory = Program.ClassJobCategories[row.GetDataByIndex(43).GetAsTyped <byte>()];

            PhysicalDamage = row.GetDataByIndex(51).GetAsTyped <ushort>();

            MagicalDamage = row.GetDataByIndex(52).GetAsTyped <ushort>();

            Parameters = new Dictionary <string, short>();

            for (var i = 0; i < 6; i++)
            {
                var name = Program.BaseParams[row.GetDataByIndex(59 + i * 2).GetAsTyped <byte>()].Name;

                if (!string.IsNullOrEmpty(name))
                {
                    Parameters.Add(name, row.GetDataByIndex(60 + i * 2).GetAsTyped <short>());
                }
            }

            if (CanBeHq)
            {
                for (var i = 0; i < 6; i++)
                {
                    var name = Program.BaseParams[row.GetDataByIndex(73 + i * 2).GetAsTyped <byte>()].Name;

                    if (!string.IsNullOrEmpty(name) && Parameters.ContainsKey(name))
                    {
                        Parameters[name] += row.GetDataByIndex(74 + i * 2).GetAsTyped <short>();
                    }
                }
            }

            MateriaSlotCount = row.GetDataByIndex(86).GetAsTyped <byte>();

            IsOvermeldable = row.GetDataByIndex(87).GetAsTyped <bool>();
        }
Esempio n. 10
0
        public ItemFood(ExDRow row)
        {
            RowKey = row.Key;

            Values = new Dictionary <string, ItemFoodValue>();

            for (var i = 0; i < 3; i++)
            {
                var baseParamName = Program.BaseParams[row.GetDataByIndex(1 + i * 6).GetAsTyped <byte>()].Name;

                if (!string.IsNullOrEmpty(baseParamName))
                {
                    Values.Add(baseParamName,
                               new ItemFoodValue
                    {
                        Value = row.GetDataByIndex(5 + i * 6).GetAsTyped <sbyte>(),
                        Max   = row.GetDataByIndex(6 + i * 6).GetAsTyped <short>()
                    });
                }
            }
        }
Esempio n. 11
0
        public void SetFromRow(ExDRow row, string languageCode)
        {
            switch (languageCode)
            {
            case "en":
                NameEn = row.GetDataByIndex(9).GetAsTyped <string>();
                break;

            case "ja":
                NameJa = row.GetDataByIndex(9).GetAsTyped <string>();
                break;

            case "ko":
                NameKo = row.GetDataByIndex(9).GetAsTyped <string>();
                break;
            }

            EquipLevel = row.GetDataByIndex(40).GetAsTyped <byte>();

            MateriaSlotCount = row.GetDataByIndex(86).GetAsTyped <byte>();
        }
Esempio n. 12
0
        public static Item CreateItemFromRow(ExDRow row)
        {
            var item = new Item(row);

            if (item.ItemUICategory.Name == "Materia")
            {
                return(new MateriaItem(row));
            }

            if (item.ItemLevel >= 290)
            {
                if (item.ItemUICategory.Name == "Meal")
                {
                    return(new Meal(row));
                }
                if (item.EquipSlotCategory.IsEquipment)
                {
                    return(new Equipment(row));
                }
            }

            return(null);
        }
Esempio n. 13
0
 public BaseParam(ExDRow row)
 {
     RowKey = row.Key;
     Name   = row.GetDataByIndex(1).GetAsTyped <string>();
 }
Esempio n. 14
0
 public ItemUICategoryModel GetItemUICategoryFromRow(ExDRow row)
 {
     return(Program.memoryContext.ItemUICategories.FirstOrDefault(itemUICategory => itemUICategory.RowKey == row.GetDataByIndex(15).GetAsTyped <byte>()));
 }
Esempio n. 15
0
        public void SetFromRow(ExDRow row)
        {
            RowKey = row.Key;

            Name = row.GetDataByIndex(0).GetAsTyped <string>();
        }
Esempio n. 16
0
 public ItemAction(ExDRow row)
 {
     RowKey      = row.Key;
     ItemFoodKey = row.GetDataByIndex(15).GetAsTyped <ushort>();
 }
Esempio n. 17
0
 public ushort GetItemLevelFromRow(ExDRow row)
 {
     return(row.GetDataByIndex(11).GetAsTyped <ushort>());
 }
Esempio n. 18
0
 public string GetNameFromRow(ExDRow row)
 {
     return(row.GetDataByIndex(9).GetAsTyped <string>());
 }
Esempio n. 19
0
 public ItemUICategory(ExDRow row)
 {
     RowKey = row.Key;
     Name   = row.GetDataByIndex(0).GetAsTyped <string>();
 }
Esempio n. 20
0
 public Item(ExDRow row)
 {
     ItemLevel         = row.GetDataByIndex(11).GetAsTyped <ushort>();
     ItemUICategory    = Program.ItemUICategories[row.GetDataByIndex(15).GetAsTyped <byte>()];
     EquipSlotCategory = Program.EquipSlotCategories[row.GetDataByIndex(17).GetAsTyped <byte>()];
 }