Quantcast WoWInterface - View Single Post - [Classic] Convert recipe item name to spellID
View Single Post
09-15-19, 10:50 AM   #14
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 45
Originally Posted by bsmorgan View Post
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.
So I noticed Skillet isn't working with Enchanting. I was having the same problem. I found through some digging that Enchanting has been reverted to the old "Craft" API. I've updated my itemID fetching to be a function as follows:

function RecipeRadar_SkillDB_GetItemLink(prof_type, index)
  local itemLink, itemID

  if (prof_type == "trade") then
    itemLink = GetTradeSkillItemLink(index)
    itemID = itemLink:match("item:(%d+)")
  elseif (prof_type == "craft") then
    itemLink = GetCraftItemLink(index)
    itemID = itemLink:match("enchant:(%d+)")

  return tonumber(itemID)

  Reply With Quote