public static TransferDefinition ReadFromFile(ResourceDataFile reader) { TransferDefinition def = new TransferDefinition(); def.DefinitionId = reader.ReadInt(); def.ToDefinitionId = reader.ReadInt(); def.RequireItemId = reader.ReadInt(); def.ApRange = reader.ReadSpan(); def.DpRange = reader.ReadSpan(); def.DxRange = reader.ReadSpan(); def.HpRange = reader.ReadSpan(); def.MpRange = reader.ReadSpan(); def.MvRange = reader.ReadSpan(); return(def); }
public static TransfersDefinition ReadFromFile(ResourceDataFile reader) { TransfersDefinition def = new TransfersDefinition(); def.DefinitionId = reader.ReadInt(); def.Transfers = new List <TransferDefinition>(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { TransferDefinition transfer = TransferDefinition.ReadFromFile(reader); transfer.DefinitionId = def.DefinitionId; } return(def); }