mirror of
https://github.com/kwsch/NHSE.git
synced 2026-05-21 17:59:47 -05:00
17 lines
555 B
C#
17 lines
555 B
C#
namespace NHSE.Core
|
|
{
|
|
public static class ItemInfo
|
|
{
|
|
private static readonly byte[] ItemKinds = ResourceUtil.GetBinaryResource("item_kind.bin");
|
|
|
|
public static ItemKind GetItemKind(IHeldItem item) => GetItemKind(item.ItemId);
|
|
public static ItemKind GetItemKind(FieldItem item) => GetItemKind(item.DisplayItemId);
|
|
|
|
public static ItemKind GetItemKind(ushort id)
|
|
{
|
|
if (id > ItemKinds.Length)
|
|
return ItemKind.Unknown;
|
|
return (ItemKind) ItemKinds[id];
|
|
}
|
|
}
|
|
} |