Originally Posted by bsmorgan
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.
|
I ended up indexing on itemID
Code:
for i = 1, GetNumTradeSkills() do
local recipe, hdr = GetTradeSkillInfo(i)
if (recipe and hdr ~= "header") then
local itemLink = GetTradeSkillItemLink(i)
local itemID = itemLink:match("item:(%d+)")
if(itemID) then
But I still have to create a database to map those to spellIDs. Very annoying.