From 1d6e6d8711d416b7189b895537b7538c37e01e92 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 6 Sep 2022 21:25:58 +0200 Subject: [PATCH] Expose profession skill lines These will come in handy later --- LibProcessable.lua | 139 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/LibProcessable.lua b/LibProcessable.lua index d270af0..8291855 100644 --- a/LibProcessable.lua +++ b/LibProcessable.lua @@ -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 @@ -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, + }, +}