Пример #1
0
        private static DropEntry <ArtBookItemEntry> GetArtBookEntry(BdatStringItem row, int index)
        {
            if (!row.Values.ContainsKey($"arts{index + 1}"))
            {
                return(null);
            }

            BdatStringValue value   = row[$"arts{index + 1}"];
            BdatStringValue percent = row[$"arts{index + 1}Per"];

            if (value.Reference == null)
            {
                return(null);
            }

            var entry = new DropEntry <ArtBookItemEntry>
            {
                Item = new ArtBookItemEntry
                {
                    Id   = value.Reference.Id,
                    Name = value.DisplayString
                },

                Rate = int.Parse((string)percent.Value)
            };

            return(entry);
        }
Пример #2
0
        private static DropEntry <EquipItemEntry> GetArmorEntry(BdatStringItem row, int index)
        {
            if (!row.Values.ContainsKey($"equip{index + 1}"))
            {
                return(null);
            }

            BdatStringValue value   = row[$"equip{index + 1}"];
            BdatStringValue slot    = row[$"equip{index + 1}_slot"];
            BdatStringValue percent = row[$"equip{index + 1}Per"];

            if (value.Reference == null)
            {
                return(null);
            }

            var entry = new DropEntry <EquipItemEntry>
            {
                Item = new EquipItemEntry
                {
                    Id   = value.Reference.Id,
                    Name = value.DisplayString
                },

                Rate      = int.Parse((string)percent.Value),
                SlotCount = int.Parse(slot.ValueString)
            };

            return(entry);
        }
Пример #3
0
        private static DropEntry <CrystalItemEntry> GetCrystalEntry(BdatStringItem row, int index)
        {
            if (!row.Values.ContainsKey($"crystal{index + 1}"))
            {
                return(null);
            }

            BdatStringValue value   = row[$"crystal{index + 1}"];
            BdatStringValue percent = row[$"crystal{index + 1}Per"];

            if (value.Reference == null)
            {
                return(null);
            }

            var entry = new DropEntry <CrystalItemEntry>
            {
                Item = new CrystalItemEntry
                {
                    Id         = value.Reference.Id,
                    Rank       = int.Parse(value.Reference["rank"].ValueString),
                    Skill1Name = value.Reference["skill1"].DisplayString,
                    Skill2Name = value.Reference["skill2"].DisplayString,
                    IsCylinder = value.Reference["cylinder"].ValueString == "1"
                },

                Rate = int.Parse(percent.ValueString)
            };

            return(entry);
        }
Пример #4
0
        private static DropNormalEntry TryGetNormalTable(BdatStringItem row)
        {
            var entry = new DropNormalEntry();

            for (int i = 0; i < MaxLotItems; i++)
            {
                DropEntry <MaterialEntry> item = GetMaterialEntry(row, i);
                if (item == null)
                {
                    break;
                }

                entry.MaterialsSingle.Add(item);
                entry.MaterialsDouble.Add(GetMaterialEntry(row, i));
            }

            return(entry);
        }
Пример #5
0
        private static DropEntry <MaterialEntry> GetMaterialEntry(BdatStringItem row, int index)
        {
            if (!row.Values.ContainsKey($"materia{index + 1}"))
            {
                return(null);
            }

            BdatStringValue value   = row[$"materia{index + 1}"];
            BdatStringValue percent = row[$"materia{index + 1}Per"];

            var material = new DropEntry <MaterialEntry>
            {
                Item = new MaterialEntry
                {
                    Id   = value.Reference.Id,
                    Name = value.DisplayString
                },

                Rate = int.Parse(percent.ValueString)
            };

            return(material);
        }