mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 12:53:41 +01:00
* Refactor and upgrade to new excel design * Obsolete ExcelResolver<T> and use only RowRef<T> * Better benchmarking for Lumina * Add custom game-supported RSV provider * Refactor and move Lazy<T> and nullable/cached row objects to RowRefs * Convert IRSVProvider to delegate, resolve strings by default * Split IExcelRow into IExcelSubrow * Extra lumina documentation * Minor RSV CS fixes * Fix UIGlowPayload warning * Fix rebase * Update to Lumina 5
22 lines
747 B
C#
22 lines
747 B
C#
using Lumina.Excel;
|
|
|
|
namespace Dalamud.Data;
|
|
|
|
/// <summary>
|
|
/// A helper class to easily resolve Lumina data within Dalamud.
|
|
/// </summary>
|
|
internal static class LuminaUtils
|
|
{
|
|
private static ExcelModule Module => Service<DataManager>.Get().Excel;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="RowRef{T}"/> class using the default <see cref="ExcelModule"/>.
|
|
/// </summary>
|
|
/// <typeparam name="T">The type of Lumina sheet to resolve.</typeparam>
|
|
/// <param name="rowId">The id of the row to resolve.</param>
|
|
/// <returns>A new <see cref="RowRef{T}"/> object.</returns>
|
|
public static RowRef<T> CreateRef<T>(uint rowId) where T : struct, IExcelRow<T>
|
|
{
|
|
return new(Module, rowId);
|
|
}
|
|
}
|