Class ClassFile
Reads a CLASS*.CFG file or a stream to another CFG file (e.g. ENEMY*.CFG in a MONSTER.BSA record).
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class ClassFile
Constructors
| Improve this Doc View SourceClassFile()
Default constructor.
Declaration
public ClassFile()
ClassFile(String, FileUsage, Boolean)
Load constructor.
Declaration
public ClassFile(string filePath, FileUsage usage = FileUsage.UseMemory, bool readOnly = true)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | |
FileUsage | usage | |
Boolean | readOnly |
Properties
| Improve this Doc View SourceCareer
Gets structured career data. Will be null unless file loaded.
Declaration
public DFCareer Career { get; }
Property Value
Type | Description |
---|---|
DFCareer |
Methods
| Improve this Doc View SourceLoad(BinaryReader)
Load a CFG file from stream.
Declaration
public bool Load(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | Stream positioned at 74-byte CFG data record. |
Returns
Type | Description |
---|---|
Boolean | True if successful. |
Load(String, FileUsage, Boolean)
Load a CFG file from disk.
Declaration
public bool Load(string filePath, FileUsage usage = FileUsage.UseMemory, bool readOnly = true)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to CLASS*.CFG file. |
FileUsage | usage | Specify if file will be accessed from disk, or loaded into RAM. |
Boolean | readOnly | File will be read-only if true, read-write if false. |
Returns
Type | Description |
---|---|
Boolean | True if successful, otherwise false. |