public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize) { if (format == GameFormat.TES3) { switch (type) { case "NAME": EDID = r.ReadSTRV(dataSize); return(true); case "FNAM": FNAM = r.ReadSTRV(dataSize); return(true); case "RNAM": RNAMs.Add(new RNAMGroup { MNAM = r.ReadSTRV(dataSize) }); return(true); case "FADT": FADT = new FADTField(r, dataSize); return(true); case "ANAM": ANAMs.Add(r.ReadSTRV(dataSize)); return(true); case "INTV": INTVs.Add(r.ReadINTV(dataSize)); return(true); default: return(false); } } switch (type) { case "EDID": EDID = r.ReadSTRV(dataSize); return(true); case "FULL": FNAM = r.ReadSTRV(dataSize); return(true); case "XNAM": XNAM = new XNAMField(r, dataSize, format); return(true); case "DATA": DATA = r.ReadINTV(dataSize); return(true); case "CNAM": CNAM = r.ReadT <UI32Field>(dataSize); return(true); case "RNAM": RNAMs.Add(new RNAMGroup { RNAM = r.ReadT <IN32Field>(dataSize) }); return(true); case "MNAM": RNAMs.Last().MNAM = r.ReadSTRV(dataSize); return(true); case "FNAM": RNAMs.Last().FNAM = r.ReadSTRV(dataSize); return(true); case "INAM": RNAMs.Last().INAM = r.ReadSTRV(dataSize); return(true); default: return(false); } }
public IN16Field?ANAM; // Enchantment points (optional) public override bool CreateField(BinaryFileReader r, GameFormat format, string type, int dataSize) { switch (type) { case "EDID": case "NAME": EDID = r.ReadSTRV(dataSize); return(true); case "MODL": MODL = new MODLGroup(r, dataSize); return(true); case "MODB": MODL.MODBField(r, dataSize); return(true); case "MODT": MODL.MODTField(r, dataSize); return(true); case "FULL": case "FNAM": FULL = r.ReadSTRV(dataSize); return(true); case "DATA": case "CTDT": DATA = new DATAField(r, dataSize, format); return(true); case "ICON": case "ITEX": ICON = r.ReadFILE(dataSize); return(true); case "INDX": INDXs.Add(new INDXFieldGroup { INDX = r.ReadINTV(dataSize) }); return(true); case "BNAM": INDXs.Last().BNAM = r.ReadSTRV(dataSize); return(true); case "CNAM": INDXs.Last().CNAM = r.ReadSTRV(dataSize); return(true); case "ENAM": ENAM = r.ReadSTRV(dataSize); return(true); case "SCRI": SCRI = new FMIDField <SCPTRecord>(r, dataSize); return(true); case "BMDT": BMDT = r.ReadT <UI32Field>(dataSize); return(true); case "MOD2": MOD2 = new MODLGroup(r, dataSize); return(true); case "MO2B": MOD2.MODBField(r, dataSize); return(true); case "MO2T": MOD2.MODTField(r, dataSize); return(true); case "MOD3": MOD3 = new MODLGroup(r, dataSize); return(true); case "MO3B": MOD3.MODBField(r, dataSize); return(true); case "MO3T": MOD3.MODTField(r, dataSize); return(true); case "MOD4": MOD4 = new MODLGroup(r, dataSize); return(true); case "MO4B": MOD4.MODBField(r, dataSize); return(true); case "MO4T": MOD4.MODTField(r, dataSize); return(true); case "ICO2": ICO2 = r.ReadFILE(dataSize); return(true); case "ANAM": ANAM = r.ReadT <IN16Field>(dataSize); return(true); default: return(false); } }