Show / Hide Table of Contents

Class DaggerfallSpellReader

Reads and parses spell data from spells.std and classic saves.

Inheritance
Object
DaggerfallSpellReader
Namespace: DaggerfallWorkshop.Utility
Assembly: Assembly-CSharp.dll
Syntax
public static class DaggerfallSpellReader

Fields

| Improve this Doc View Source

DEFAULT_FILENAME

Declaration
public const string DEFAULT_FILENAME = "SPELLS.STD"
Field Value
Type Description
String

Methods

| Improve this Doc View Source

DeserializeSpell(String)

Deserializes single

Declaration
public static SpellRecord.SpellRecordData DeserializeSpell(string data)
Parameters
Type Name Description
String data
Returns
Type Description
SpellRecord.SpellRecordData
| Improve this Doc View Source

DeserializeSpells(String)

Deserializes array of spell records

Declaration
public static List<SpellRecord.SpellRecordData> DeserializeSpells(string data)
Parameters
Type Name Description
String data
Returns
Type Description
List<SpellRecord.SpellRecordData>
| Improve this Doc View Source

ReadSpellData(Byte[], out SpellRecord.SpellRecordData)

Creates a spell record from byte array.

Declaration
public static bool ReadSpellData(byte[] chunk, out SpellRecord.SpellRecordData spellRecord)
Parameters
Type Name Description
Byte[] chunk

Input spell data; this is an array of bytes with length DaggerfallWorkshop.Utility.DaggerfallSpellReader.SPELLRECORDSIZE.

SpellRecord.SpellRecordData spellRecord

Resulting spell record data.

Returns
Type Description
Boolean

True if succeeded.

| Improve this Doc View Source

ReadSpellData(BinaryReader, out SpellRecord.SpellRecordData)

Creates a spell record

Declaration
public static bool ReadSpellData(BinaryReader reader, out SpellRecord.SpellRecordData spellRecord)
Parameters
Type Name Description
BinaryReader reader
SpellRecord.SpellRecordData spellRecord
Returns
Type Description
Boolean
| Improve this Doc View Source

ReadSpellsFile(String)

Parses a SPELLS.STD file.

Declaration
public static List<SpellRecord.SpellRecordData> ReadSpellsFile(string filePath = null)
Parameters
Type Name Description
String filePath

If null, looks for SPELLS.STD in Arena2 path.

Returns
Type Description
List<SpellRecord.SpellRecordData>

List of SpellRecordData structs.

| Improve this Doc View Source

SerializeSpell(SpellRecord.SpellRecordData)

Serializes spell record to json

Declaration
public static string SerializeSpell(SpellRecord.SpellRecordData spell)
Parameters
Type Name Description
SpellRecord.SpellRecordData spell
Returns
Type Description
String
| Improve this Doc View Source

SerializeSpells(List<SpellRecord.SpellRecordData>)

serializes array of spells to json

Declaration
public static string SerializeSpells(List<SpellRecord.SpellRecordData> spells)
Parameters
Type Name Description
List<SpellRecord.SpellRecordData> spells
Returns
Type Description
String
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX