示例#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));
        }
        /// <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)
 {
 }
 public ChocoboRaceStatus(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
 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) { }
 public GoldSaucerTextData(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow)
 {
 }
 public CompanionUnlock(IXivSheet sheet, IRelationalRow sourceRow)
     : base(sheet, sourceRow)
 {
 }
 /// <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) { }
 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)
 {
 }
 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)
 {
 }
 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) { }
 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)
 {
 }