From d19c4a1b2f49a2ebffb600683c2914a66091eb7a Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Fri, 22 Dec 2023 09:56:08 +0900 Subject: [PATCH] Add fungibleItemId on inventory item --- .../States/Models/Item/InventoryItemType.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NineChronicles.Headless/GraphTypes/States/Models/Item/InventoryItemType.cs b/NineChronicles.Headless/GraphTypes/States/Models/Item/InventoryItemType.cs index feacb00b0..037d313de 100644 --- a/NineChronicles.Headless/GraphTypes/States/Models/Item/InventoryItemType.cs +++ b/NineChronicles.Headless/GraphTypes/States/Models/Item/InventoryItemType.cs @@ -43,6 +43,17 @@ public InventoryItemType() return tradableItem.TradableId; } + return null; + }); + Field( + "fungibleItemId", + resolve: context => + { + if (context.Source.item is IFungibleItem fungibleItem) + { + return fungibleItem.FungibleId.ToString(); + } + return null; }); }