mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat(ExcelResolver): add GetWithLanguage
This commit is contained in:
parent
9558855578
commit
7a0f514bc9
1 changed files with 8 additions and 1 deletions
|
|
@ -26,6 +26,13 @@ namespace Dalamud.Game.ClientState.Resolvers
|
|||
/// <summary>
|
||||
/// Gets GameData linked to this excel row.
|
||||
/// </summary>
|
||||
public T GameData => Service<DataManager>.Get().GetExcelSheet<T>().GetRow(this.Id);
|
||||
public T? GameData => Service<DataManager>.Get().GetExcelSheet<T>()?.GetRow(this.Id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets GameData linked to this excel row with the specified language.
|
||||
/// </summary>
|
||||
/// <param name="language">The language.</param>
|
||||
/// <returns>The ExcelRow in the specified language.</returns>
|
||||
public T? GetWithLanguage(ClientLanguage language) => Service<DataManager>.Get().GetExcelSheet<T>(language)?.GetRow(this.Id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue