Skip to content

Commit

Permalink
Expose profession skill lines
Browse files Browse the repository at this point in the history
These will come in handy later
  • Loading branch information
p3lim committed Sep 6, 2022
1 parent 66f3309 commit 1d6e6d8
Showing 1 changed file with 139 additions and 0 deletions.
139 changes: 139 additions & 0 deletions LibProcessable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,20 @@ function lib:GetProfessionCategories(professionID)
return professionCategories and CopyTable(professionCategories)
end

--[[ LibProcessable:GetProfessionSkillLines(_professionID_)
Returns data of all skill lines for a given (valid) profession, indexed by the expansion level index.
**Arguments:**
* `professionID`: The profession ID _(number)_
**Return values:**
* `skillLines`: Profession skill lines _(table)_
--]]
function lib:GetProfessionSkillLines(professionID)
local professionSkillLines = data.professionSkillLines[professionID]
return professionSkillLines and CopyTable(professionSkillLines)
end

local classicIDs = {
[(GetSpellInfo(2259))] = 171, -- Alchemy
[(GetSpellInfo(2018))] = 164, -- Blacksmithing
Expand Down Expand Up @@ -669,3 +683,128 @@ data.professionCategories = {
[LE_EXPANSION_SHADOWLANDS] = 1395,
},
}

-- https://wowpedia.fandom.com/wiki/TradeSkillLineID
data.professionSkillLines = {
[171] = { -- Alchemy
[LE_EXPANSION_CLASSIC] = 2485,
[LE_EXPANSION_BURNING_CRUSADE] = 2484,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2483,
[LE_EXPANSION_CATACLYSM] = 2482,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2481,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2480,
[LE_EXPANSION_LEGION] = 2479,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2478,
[LE_EXPANSION_SHADOWLANDS] = 2750,
},
[164] = { -- Blacksmithing
[LE_EXPANSION_CLASSIC] = 2477,
[LE_EXPANSION_BURNING_CRUSADE] = 2476,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2475,
[LE_EXPANSION_CATACLYSM] = 2474,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2473,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2472,
[LE_EXPANSION_LEGION] = 2454,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2437,
[LE_EXPANSION_SHADOWLANDS] = 2751,
},
[333] = { -- Enchanting
[LE_EXPANSION_CLASSIC] = 2494,
[LE_EXPANSION_BURNING_CRUSADE] = 2493,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2492,
[LE_EXPANSION_CATACLYSM] = 2491,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2489,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2488,
[LE_EXPANSION_LEGION] = 2487,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2486,
[LE_EXPANSION_SHADOWLANDS] = 2753,
},
[202] = { -- Engineering
[LE_EXPANSION_CLASSIC] = 2506,
[LE_EXPANSION_BURNING_CRUSADE] = 2505,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2504,
[LE_EXPANSION_CATACLYSM] = 2503,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2502,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2501,
[LE_EXPANSION_LEGION] = 2500,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2499,
[LE_EXPANSION_SHADOWLANDS] = 2755,
},
[182] = { -- Herbalism
[LE_EXPANSION_CLASSIC] = 2556,
[LE_EXPANSION_BURNING_CRUSADE] = 2555,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2554,
[LE_EXPANSION_CATACLYSM] = 2553,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2552,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2551,
[LE_EXPANSION_LEGION] = 2550,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2549,
[LE_EXPANSION_SHADOWLANDS] = 2760,
},
[773] = { -- Inscription
[LE_EXPANSION_CLASSIC] = 2514,
[LE_EXPANSION_BURNING_CRUSADE] = 2513,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2512,
[LE_EXPANSION_CATACLYSM] = 2511,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2510,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2509,
[LE_EXPANSION_LEGION] = 2508,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2507,
[LE_EXPANSION_SHADOWLANDS] = 2756,
},
[755] = { -- Jewelcrafting
[LE_EXPANSION_CLASSIC] = 2524,
[LE_EXPANSION_BURNING_CRUSADE] = 2523,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2522,
[LE_EXPANSION_CATACLYSM] = 2521,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2520,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2519,
[LE_EXPANSION_LEGION] = 2518,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2517,
[LE_EXPANSION_SHADOWLANDS] = 2757,
},
[165] = { -- Leatherworking
[LE_EXPANSION_CLASSIC] = 2532,
[LE_EXPANSION_BURNING_CRUSADE] = 2531,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2530,
[LE_EXPANSION_CATACLYSM] = 2529,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2528,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2527,
[LE_EXPANSION_LEGION] = 2526,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2525,
[LE_EXPANSION_SHADOWLANDS] = 2758,
},
[186] = { -- Mining
[LE_EXPANSION_CLASSIC] = 2572,
[LE_EXPANSION_BURNING_CRUSADE] = 2571,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2570,
[LE_EXPANSION_CATACLYSM] = 2569,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2568,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2567,
[LE_EXPANSION_LEGION] = 2566,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2565,
[LE_EXPANSION_SHADOWLANDS] = 2761,
},
[393] = { -- Skinning
[LE_EXPANSION_CLASSIC] = 2564,
[LE_EXPANSION_BURNING_CRUSADE] = 2563,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2562,
[LE_EXPANSION_CATACLYSM] = 2561,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2560,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2559,
[LE_EXPANSION_LEGION] = 2558,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2557,
[LE_EXPANSION_SHADOWLANDS] = 2762,
},
[197] = { -- Tailoring
[LE_EXPANSION_CLASSIC] = 2540,
[LE_EXPANSION_BURNING_CRUSADE] = 2539,
[LE_EXPANSION_WRATH_OF_THE_LICH_KING] = 2538,
[LE_EXPANSION_CATACLYSM] = 2537,
[LE_EXPANSION_MISTS_OF_PANDARIA] = 2536,
[LE_EXPANSION_WARLORDS_OF_DRAENOR] = 2535,
[LE_EXPANSION_LEGION] = 2534,
[LE_EXPANSION_BATTLE_FOR_AZEROTH] = 2533,
[LE_EXPANSION_SHADOWLANDS] = 2759,
},
}

0 comments on commit 1d6e6d8

Please sign in to comment.