Class DataManager
This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
Inheritance
Implements
Inherited Members
Namespace: Dalamud.Data
Assembly: Dalamud.dll
Syntax
public class DataManager : IDisposable
Constructors
| Improve this Doc View SourceDataManager(ClientLanguage)
Initializes a new instance of the DataManager class.
Declaration
public DataManager(ClientLanguage language)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientLanguage | language | The language to load data with by default. |
Properties
| Improve this Doc View SourceClientOpCodes
Gets the OpCodes sent by the client to the server.
Declaration
public ReadOnlyDictionary<string, ushort> ClientOpCodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ReadOnlyDictionary<System.String, System.UInt16> |
Excel
Gets an
Declaration
public ExcelModule Excel { get; }
Property Value
| Type | Description |
|---|---|
| ExcelModule |
IsDataReady
Gets a value indicating whether Game Data is ready to be read.
Declaration
public bool IsDataReady { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ServerOpCodes
Gets the OpCodes sent by the server to the client.
Declaration
public ReadOnlyDictionary<string, ushort> ServerOpCodes { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.ObjectModel.ReadOnlyDictionary<System.String, System.UInt16> |
Methods
| Improve this Doc View SourceDispose()
Dispose this DataManager.
Declaration
public void Dispose()
FileExists(String)
Check if the file with the given path exists within the game's index files.
Declaration
public bool FileExists(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | The path inside of the game files. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the file exists. |
GetExcelSheet<T>()
Get an
Declaration
public ExcelSheet<T> GetExcelSheet<T>()
where T : ExcelRow
Returns
| Type | Description |
|---|---|
| ExcelSheet<T> | The |
Type Parameters
| Name | Description |
|---|---|
| T | The excel sheet type to get. |
GetExcelSheet<T>(ClientLanguage)
Get an
Declaration
public ExcelSheet<T> GetExcelSheet<T>(ClientLanguage language)
where T : ExcelRow
Parameters
| Type | Name | Description |
|---|---|---|
| ClientLanguage | language | Language of the sheet to get. |
Returns
| Type | Description |
|---|---|
| ExcelSheet<T> | The |
Type Parameters
| Name | Description |
|---|---|
| T | The excel sheet type to get. |
GetFile(String)
Get a
Declaration
public FileResource GetFile(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | The path inside of the game files. |
Returns
| Type | Description |
|---|---|
| FileResource | The |
GetFile<T>(String)
Get a
Declaration
public T GetFile<T>(string path)
where T : FileResource
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | path | The path inside of the game files. |
Returns
| Type | Description |
|---|---|
| T | The |
Type Parameters
| Name | Description |
|---|---|
| T | The type of resource. |
GetIcon(ClientLanguage, Int32)
Get a
Declaration
public TexFile GetIcon(ClientLanguage iconLanguage, int iconId)
Parameters
| Type | Name | Description |
|---|---|---|
| ClientLanguage | iconLanguage | The requested language. |
| System.Int32 | iconId | The icon ID. |
Returns
| Type | Description |
|---|---|
| TexFile | The |
GetIcon(Int32)
Get a
Declaration
public TexFile GetIcon(int iconId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | iconId | The icon ID. |
Returns
| Type | Description |
|---|---|
| TexFile | The |
GetIcon(String, Int32)
Get a
Declaration
public TexFile GetIcon(string type, int iconId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | type | The type of the icon (e.g. 'hq' to get the HQ variant of an item icon). |
| System.Int32 | iconId | The icon ID. |
Returns
| Type | Description |
|---|---|
| TexFile | The |
Initialize(String)
Initialize this data manager.
Declaration
public void Initialize(string baseDir)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseDir | The directory to load data from. |