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); }
protected virtual T CreateRow(IRelationalRow sourceRow) { if (RowConstructor == null) { throw new NotSupportedException("No matching constructor found."); } return((T)RowConstructor.Invoke(new object[] { this, sourceRow })); }
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); }
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()); }
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)); }
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(); }
/// <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(); }
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); }
public ActionCategory(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public SpearfishingItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public Quest(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public Sanction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public FccShop(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public GatheringPointBonus(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
protected PointRecovery(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
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) { }
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) { }
public GrandCompany(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
/// <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) { }
public SphereScroll(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public CustomizeUnlock(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
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) { }
public Addon(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
protected HousingItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
/// <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) { }
public EventAction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public BuddyAction(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public AchievementCategory(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public TomestonesItem(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public CompanionTransient(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
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) { }
public ENpcBase(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public Fate(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public TripleTriadCardType(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public RelicNote(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
/// <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) { }
/// <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) { }
public LeveClient(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public GatheringPoint(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public GatheringCondition(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public GatheringTool(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
/// <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) { }
public LogMessage(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public ClassJob(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) { }
/// <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; }
public RecipeBookUnlock(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }
public Fireworks(IXivSheet sheet, IRelationalRow sourceRow) : base(sheet, sourceRow) { }