[Classic] Convert recipe item name to spellID
In BfA, you can do the following with a crafting recipe spell name, and get the related spellID:
Code:
local spellLink = GetSpellLink(spellName); I used to use GetTradeSkillLink with an index to get this information, but that function has been removed. Does anyone know the correct way to get the spellID from a crafted name with WoW Classic, such as:
Thanks! |
I tried using GetItemInfo and parsing the itemLink, but it doesn't work for everything. For example, it works for "Murlock Fin Soup" but not for "Clam Chowder" :/ There's no itemLink returned in the latter case.
|
I think I found a different way to do what I need, using the new C_TradeSkillUI.GetAllRecipeIDs() function. Will test.
|
Foiled again, as that API doesn't exist in Classic... so back to the original question. How in the world do I map known recipes to an ID?
|
I do not quite understand.
In the title you are asking about recipes, but in the post you are also asking about "Smelt Bronze" and "Heavy Linen Bandage" which are *not* taught by recipes. If you want to get the spellID from a recipe that teaches it, you can use this lib: LibRecipes-2.0 |
Quote:
b) Its API takes an ID. An ID I don't have, because the entire point of this post is me asking how do I take the TEXTUAL NAME returned by GetTradeSkillInfo and get it CONVERTED into an ID. |
Quote:
Generally, I think libRecipes could work in this case IF it had a classic version, since I can get the itemID now. |
Quote:
|
Quote:
Also, I already have to maintain a Classic specific version because some vendors that sell recipes in Classic don't exist and/or don't sell the recipes in later WoW releases. So I'm pretty sure there would need to be a Classic specific version of the library for it to be useful. |
Code:
spellID = select(7, GetSpellInfo(spellName)) edit: Whoops, pretty sure this doesn't work with Tradeskills. It's been a few years, but I think we had to build our own lookup table in Gnomeworks for recipeIDs. |
Quote:
Quote:
What I have so far can be found at https://bitbucket.org/yunohu/reciper...ic/src/master/ Specifically the RecipeData.lua file and the RegionData.lua file. |
I'm working on the tradeskill addon Skillet-Classic, a port of Skillet from retail, and I find it amazing that I can get the names of tradeskills and I can "DoTradeSkill(name, count)" which triggers a bunch of events which contain the spellID. I can "name = GetSpellInfo(spellID)" but given the name, I can't get the spellID because all the functions that would do so don't exist in Classic.
Skillet (the retail version) is locale agnostic because it uses numeric spellIDs. I had to bastardize Skillet-Classic to use the name as the key instead. This blew any chance of a common set of source files. |
Quote:
I ended up indexing on itemID Code:
for i = 1, GetNumTradeSkills() do |
Quote:
Code:
function RecipeRadar_SkillDB_GetItemLink(prof_type, index) |
Quote:
I'll have to find documentation (if it exists) for the Craft* API and see if that helps any. |
Do either of these Load on Demand Blizzard addons load with Enchanting?
|
It's worse than that. To populate my own frame I use:
Code:
numSkills = GetNumTradeSkills() I got enough bugs to chase out of Skillet-Classic as it is so I'll have to defer introducing even more bugs for now. |
Quote:
|
Quote:
|
All times are GMT -6. The time now is 02:09 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI