Skip to content

Commit

Permalink
Add auto learnProfession
Browse files Browse the repository at this point in the history
  • Loading branch information
Neogeekmo committed Aug 28, 2024
1 parent de96f96 commit fdffd64
Show file tree
Hide file tree
Showing 3 changed files with 335 additions and 0 deletions.
1 change: 1 addition & 0 deletions APR-Recorder.toc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Core.lua
Config.lua
helper/Utils.lua
helper/RouteManagement.lua
helper/spells.lua

Commands.lua
Event.lua
Expand Down
10 changes: 10 additions & 0 deletions Event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ local events = {
target = "PLAYER_TARGET_CHANGED",
scenario = "SCENARIO_CRITERIA_UPDATE",
portal = { "PLAYER_LEAVING_WORLD", "PLAYER_ENTERING_WORLD" },
learnProfession = "LEARNED_SPELL_IN_SKILL_LINE"
-- warMode = "WAR_MODE_STATUS_UPDATE",
-- vehicle = { "UNIT_ENTERING_VEHICLE", "UNIT_EXITING_VEHICLE" },
}
Expand Down Expand Up @@ -626,6 +627,15 @@ function AprRC.event.functions.portal(event, ...)
end
end

function AprRC.event.functions.learnProfession(event, ...)
local spellID, skillLineIndex, isGuildPerkSpell = ...
if tContains(AprRC.professionSpellIDs, spellID) then
local step = { LearnProfession = spellID }
AprRC:SetStepCoord(step)
AprRC:NewStep(step)
end
end

---------------------
-- V2
---------------------
Expand Down
324 changes: 324 additions & 0 deletions helper/spells.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,324 @@
AprRC.professionSpellIDs = {
-- Alchimie
423321,
2259,
366261,
264243,
265787,
105206,
3101,
264255,
264211,
264245,
3464,
309822,
11611,
28596,
80731,
195095,
264220,
51304,
264213,
264247,
264250,
156606,
-- forge
423332,
264442,
264436,
265803,
264444,
264446,
264434,
264448,
110396,
76666,
51300,
29844,
9785,
3538,
3100,
264440,
158737,
365677,
2018,
195097,
264438,
309827,
-- enchant
423334,
366255,
7411,
195096,
74258,
110400,
264460,
265805,
264473,
13920,
7412,
264455,
264467,
158716,
264462,
264469,
28029,
309832,
7413,
264464,
51313,
264471,
-- Inge
4036,
12656,
4038,
30350,
4037,
82774,
158739,
195112,
110403,
51306,
49383,
264475,
310542,
264483,
264487,
423335,
264492,
264479,
264490,
264485,
265807,
366254,
264481,
-- tailoring
26790,
110426,
75156,
3908,
158758,
3909,
12180,
3910,
51309,
195126,
264616,
310949,
264622,
264626,
423343,
264630,
264618,
264628,
264624,
265815,
366258,
264620,
-- calli
45357,
86008,
195115,
45361,
45358,
158748,
45359,
110417,
45360,
45363,
264494,
309805,
264500,
264504,
423338,
264508,
264496,
264506,
264502,
265809,
366251,
264498,
-- joaillerie
73318,
25229,
28897,
25230,
28894,
28895,
110420,
158750,
195116,
264532,
51311,
311967,
264539,
264544,
423339,
264548,
264534,
264546,
264542,
265811,
366250,
264537,
-- cuir
3811,
110423,
81199,
10662,
195119,
32549,
2108,
158752,
264577,
51302,
3104,
309038,
264583,
264588,
423340,
264592,
264579,
264590,
264585,
265813,
366249,
264581,
-- Minage
2656,
2575,
309835,
265845,
10248,
265849,
265851,
265853,
29354,
3564,
50310,
74517,
366260,
102161,
158754,
2576,
195122,
265837,
265839,
265841,
265843,
265847,
423341,
-- depecage
8613,
10768,
265863,
8617,
308569,
32678,
74522,
195125,
205243,
265857,
265861,
102216,
265865,
8618,
50305,
265855,
265869,
265871,
158756,
265859,
265867,
366259,
423342,
392445,
392440,
194174,

-- herbo
193290,
2366,
309780,
265831,
158745,
366252,
195114,
265825,
265835,
265821,
265823,
265827,
2368,
3570,
11993,
28695,
50300,
74519,
110413,
265829,
265819,
441327,
265834,
-- archéologie
78670,
278910,
195127,
158762,
74268,
88961,
89718,
89719,
89720,
89721,
89722,
110393,
-- cuisine
2550,
18260,
3413,
158765,
104381,
88053,
33359,
195128,
51296,
3102,
264632,
309830,
264638,
264642,
423333,
264646,
264634,
264644,
264640,
265817,
366256,
264636,
-- peche
271990,
158743,
33095,
131474,
7620,
7731,
131476,
271616,
272011,
18248,
110410,
7732,
51294,
88868,
131490,
271660,
271664,
423336,
271675,
271672,
271662,
271677,
366253,
271658,
}

0 comments on commit fdffd64

Please sign in to comment.