mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Use DataShare in ObjectIdentifier
This commit is contained in:
parent
52b2b66cd7
commit
ef3ffb5f10
17 changed files with 4138 additions and 573 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Dalamud.Data;
|
||||
using Lumina.Excel.GeneratedSheets;
|
||||
using Penumbra.Api.Enums;
|
||||
using Action = Lumina.Excel.GeneratedSheets.Action;
|
||||
|
|
@ -18,13 +19,13 @@ public static class ChangedItemExtensions
|
|||
};
|
||||
}
|
||||
|
||||
public static object? GetObject( this ChangedItemType type, uint id )
|
||||
public static object? GetObject( this ChangedItemType type, DataManager manager, uint id )
|
||||
{
|
||||
return type switch
|
||||
{
|
||||
ChangedItemType.None => null,
|
||||
ChangedItemType.Item => ObjectIdentification.DataManager?.GetExcelSheet< Item >()?.GetRow( id ),
|
||||
ChangedItemType.Action => ObjectIdentification.DataManager?.GetExcelSheet< Action >()?.GetRow( id ),
|
||||
ChangedItemType.Item => manager.GetExcelSheet< Item >()?.GetRow( id ),
|
||||
ChangedItemType.Action => manager.GetExcelSheet< Action >()?.GetRow( id ),
|
||||
ChangedItemType.Customization => null,
|
||||
_ => throw new ArgumentOutOfRangeException( nameof( type ), type, null ),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue