Пример #1
0
        public GCScripShopItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
        {
            GCScripShopCategory = Sheet.Collection.GetSheet <GCScripShopCategory>()[ParentKey];
            GCShop = Sheet.Collection.GetSheet <GCShop>().FirstOrDefault(_ => _.GrandCompany.Key == GCScripShopCategory.GrandCompany.Key);

            var sealItem = GCShop.GrandCompany.SealItem;

            Cost = new ShopListingItem(this, sealItem, GCSealsCost, false, 0);
        }
        public GrandCompanySealShopItem(IXivSheet sheet, IRelationalRow sourceRow)
            : base(sheet, sourceRow)
        {
            GCShop = Sheet.Collection.GetSheet<GCShop>().FirstOrDefault(_ => _.Min <= Key && _.Max >= Key);

            if (GCShop == null) return;

            var sealItem = GCShop.GrandCompany.SealItem;
            Cost = new ShopListingItem(this, sealItem, AsInt32("Cost"), false);
        }
Пример #3
0
        protected virtual T CreateRow(IRelationalRow sourceRow)
        {
            if (RowConstructor == null)
            {
                throw new NotSupportedException("No matching constructor found.");
            }

            return((T)RowConstructor.Invoke(new object[] {
                this, sourceRow
            }));
        }
Пример #4
0
        public GrandCompanySealShopItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
        {
            GCShop = Sheet.Collection.GetSheet <GCShop>().FirstOrDefault(_ => _.Min <= Key && _.Max >= Key);

            if (GCShop == null)
            {
                return;
            }

            var sealItem = GCShop.GrandCompany.SealItem;

            Cost = new ShopListingItem(this, sealItem, AsInt32("Cost"), false);
        }
Пример #5
0
        private IRelationalRow[] BuildAssignedData()
        {
            List <IRelationalRow> data = new List <IRelationalRow>();

            for (int i = 0; i < ENpcBase.DataCount; ++i)
            {
                IRelationalRow val = GetData(i);
                if (val != null)
                {
                    data.Add(val);
                }
            }

            return(data.ToArray());
        }
Пример #6
0
        protected override ItemAction CreateRow(IRelationalRow sourceRow)
        {
            var typeKey = Convert.ToInt32(sourceRow["Type"]);

            if (!ItemActionTypes.TryGetValue(typeKey, out var type))
            {
                type = DefaultItemActionType;
                Trace.WriteLine(string.Format("Unhandled item action type '{0}'.", typeKey));
            }
            var args = new object[] {
                this, sourceRow
            };
            const BindingFlags ActivatorBindFlags =
                BindingFlags.Instance | BindingFlags.CreateInstance | BindingFlags.Public
                | BindingFlags.NonPublic;

            return((ItemAction)Activator.CreateInstance(type, ActivatorBindFlags, null, args, null));
        }
Пример #7
0
        protected override Item CreateRow(IRelationalRow sourceRow)
        {
            var uiCategory = (ItemUICategory)sourceRow["ItemUICategory"];

            if (!ItemTypes.TryGetValue(uiCategory.Key, out Type type))
            {
                type = DefaultItemType;
            }
            var args = new object[] {
                this, sourceRow
            };

            const BindingFlags ActivatorBindFlags =
                BindingFlags.Instance | BindingFlags.CreateInstance | BindingFlags.Public
                | BindingFlags.NonPublic;

            return((Item)Activator.CreateInstance(type, ActivatorBindFlags, null, args, null));
        }
Пример #8
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="WeatherRate" /> class.
        /// </summary>
        /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
        /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
        public WeatherRate(IXivSheet sheet, IRelationalRow sourceRow)
            : base(sheet, sourceRow)
        {
            const int Count = 8;

            var w = new List<Weather>();
            var wr = new List<Tuple<int, Weather>>();
            var min = 0;
            for (var i = 0; i < Count; ++i) {
                var suffix = string.Format("[{0}]", i);

                var weather = (Weather)this["Weather" + suffix];
                var rate = Convert.ToInt32(this["Rate" + suffix]);

                w.Add(weather);
                wr.Add(Tuple.Create(min + rate, weather));

                min += rate;
            }
            _PossibleWeathers = w.Distinct().ToArray();
            _WeatherRates = wr.ToArray();
        }
Пример #9
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="WeatherRate" /> class.
        /// </summary>
        /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
        /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
        public WeatherRate(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
        {
            const int Count = 8;

            var w   = new List <Weather>();
            var wr  = new List <Tuple <int, Weather> >();
            var min = 0;

            for (var i = 0; i < Count; ++i)
            {
                var suffix = string.Format("[{0}]", i);

                var weather = (Weather)this["Weather" + suffix];
                var rate    = Convert.ToInt32(this["Rate" + suffix]);

                w.Add(weather);
                wr.Add(Tuple.Create(min + rate, weather));

                min += rate;
            }
            _PossibleWeathers = w.Distinct().ToArray();
            _WeatherRates     = wr.ToArray();
        }
Пример #10
0
        private IEnumerable <DefinitionUpdater> MatchRows()
        {
            DefinitionUpdater[] defUpdaters =
                _PreviousDefinition.DataDefinitions.Select(_ => new DefinitionUpdater(_PreviousDefinition, _)).ToArray();

            // Record a list of compatible indexes by previous sheet column.
            // These are the only columns to be tested.
            ColumnComparer[] comparers = _PreviousSheet.Header.Columns
                                         .Select(c => ColumnComparer.Create(c, _UpdatedSheet.Header.Columns))
                                         .ToArray();

            if (_PreviousSheet.Header.Variant == 2)
            {
                return(MatchVariant2Rows(defUpdaters, comparers));
            }

            foreach (IRow prevRow in _PreviousSheet)
            {
                if (!_UpdatedSheet.ContainsRow(prevRow.Key))
                {
                    continue;
                }

                object[] prevRowFields =
                    _PreviousSheet.Header.Columns.OrderBy(_ => _.Index).Select(_ => prevRow[_.Index]).ToArray();
                IRelationalRow updatedRow       = _UpdatedSheet[prevRow.Key];
                object[]       updatedRowFields =
                    _UpdatedSheet.Header.Columns.OrderBy(_ => _.Index).Select(_ => updatedRow[_.Index]).ToArray();

                foreach (DefinitionUpdater def in defUpdaters)
                {
                    def.MatchRow(prevRowFields, updatedRowFields, comparers);
                }
            }

            return(defUpdaters);
        }
Пример #11
0
 public ActionCategory(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #12
0
 public SpearfishingItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #13
0
 public Quest(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #14
0
 public Sanction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #15
0
 public FccShop(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #16
0
 public GatheringPointBonus(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #17
0
 protected PointRecovery(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #18
0
 protected ActionBase(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #19
0
 public ChocoboRaceStatus(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #20
0
 protected HousingLayoutLimit(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #21
0
 public BuddyEquipUnlock(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
 public MinionSkillType(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
 public PhysicalWeapon(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #24
0
 public GrandCompany(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentType"/> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet"/> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow"/> to read data from.</param>
 public ContentType(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #26
0
 public SphereScroll(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #27
0
 public CustomizeUnlock(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #28
0
 public GpRecovery(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #29
0
 public GoldSaucerTextData(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
 public CompanionUnlock(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModelChara"/> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet"/> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow"/> to read data from.</param>
 public ModelChara(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #32
0
 public Addon(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #33
0
 protected HousingItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #34
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Equipment" /> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
 protected Equipment(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #35
0
 public EventAction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #36
0
 public BuddyAction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #37
0
 public AchievementCategory(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #38
0
 public TomestonesItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
 public CompanionTransient(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #40
0
 public HostileEffect(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="LeveRewardItem" /> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
 public LeveRewardItem(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #42
0
 public ENpcBase(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #43
0
 public Fate(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #44
0
 public TripleTriadCardType(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #45
0
 public RelicNote(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #46
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="NpcEquip" /> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
 public NpcEquip(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #47
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentType"/> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet"/> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow"/> to read data from.</param>
 public ContentType(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
 /// <summary>
 /// Initializes a new instance of the <see cref="InstanceContent"/> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet"/> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow"/> to read data from.</param>
 public InstanceContent(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #49
0
 public GpRecovery(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #50
0
 public LeveClient(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #51
0
 public GatheringPoint(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #52
0
 public GatheringCondition(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
Пример #53
0
 public GatheringTool(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #54
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="MateriaItem" /> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
 public MateriaItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #55
0
 public LogMessage(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #56
0
 public ClassJob(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
Пример #57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstanceContent"/> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet"/> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow"/> to read data from.</param>
 public InstanceContent(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #58
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="XivRow" /> class.
 /// </summary>
 /// <param name="sheet"><see cref="IXivSheet" /> containing this object.</param>
 /// <param name="sourceRow"><see cref="IRelationalRow" /> to read data from.</param>
 public XivRow(IXivSheet sheet, IRelationalRow sourceRow)
 {
     Sheet      = sheet;
     _SourceRow = sourceRow;
 }
Пример #59
0
 public RecipeBookUnlock(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
Пример #60
0
 public Fireworks(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }