Download
(12 Kb)
Download
Updated: 07/14/24 12:34 PM
Compatibility:
Gold Road (10.0.0)
Updated:07/14/24 12:34 PM
Created:07/14/24 12:34 PM
Monthly downloads:41
Total downloads:101
Favorites:1
MD5:
10.0.0
LibRecipe  Less than 3 days old!
Version: 1.00
by: Sharlikran [More]
Library using MM code to obtain the Recipe ItemLink of a crafted piece of Furniture.

LibRecipe:GetRecipeItemLink(itemLink)

- Returns nil or the Recipe for the Furniture ItemLink

LibRecipe:GetNumIngredients(itemLink)

- Returns 0 or the Number of Ingredients
Optional Files (0)


Post A Reply Comment Options
Unread Today, 08:51 AM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 21
File comments: 416
Uploads: 41
A reverse lookup from crafted item back to its source recipe or plan is something that I hadn't considered before, but I think it is pretty useful, so I added GetSourceItemIdFromResultItem to LibCharacterKnowledge 2.0.4, and there's a new feature in Character Knowledge that makes use of this.

However, I took a different approach, because hard-coding thousands of IDs is not only cumbersome, but it also requires a human to update it every patch. LCK already has the means to automatically detect all the recipe IDs in the game without any human intervention, and so it was trivially easy for me to add a reverse-lookup feature that doesn't rely on any hard-coded data.

So I would suggest using LCK instead, to reduce the number of libraries and for easier maintenance. LCK doesn't do anything with ingredients, but GetItemLinkRecipeNumIngredients exists as a base-game API, so there's not that much to do there in the first place.
Last edited by code65536 : 07/15/24 at 09:03 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: