bugfix: fuse item from inventory blueprint

This commit is contained in:
Robert Paciorek 2023-09-09 09:58:58 +00:00 committed by Spirtix
parent c6ad11b5d7
commit 70a28f4d1b

View File

@ -963,7 +963,13 @@ public class ContentController : Controller {
ItemData blueprintItem; ItemData blueprintItem;
try { try {
blueprintItem = itemService.GetItem(req.BluePrintItemID ?? -1); if (req.BluePrintInventoryID != null) {
blueprintItem = itemService.GetItem(
viking.Inventory.InventoryItems.FirstOrDefault(e => e.Id == req.BluePrintInventoryID).ItemId
);
} else {
blueprintItem = itemService.GetItem(req.BluePrintItemID ?? -1);
}
} catch(System.Collections.Generic.KeyNotFoundException) { } catch(System.Collections.Generic.KeyNotFoundException) {
return Ok(new FuseItemsResponse { Status = Status.BluePrintItemNotFound }); return Ok(new FuseItemsResponse { Status = Status.BluePrintItemNotFound });
} }