Repository navigation
Expand file tree
/
Copy pathSpellData.lua
More file actions
565 lines (552 loc) · 25.6 KB
/
Copy pathSpellData.lua
File metadata and controls
565 lines (552 loc) · 25.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
local ADDON_NAME, ns = ...
local SpellData = {}
ns.SpellData = SpellData
-- Spell classifications per class.
-- CC/interrupt sourced from LibPlayerSpells-1.0 (AdiAddons). Excludes snares and taunts.
-- Defensive and offensive cooldown lists cover common abilities across specs.
--
-- CC sub-categories: "stun", "disorient", "incapacitate", "root", "silence", "fear", "knockback"
-- Broad roles: "interrupt", "defensive", "offensive_cd"
local CLASS_SPELLS = {
DEATHKNIGHT = {
-- Interrupt
[47528] = "interrupt", -- Mind Freeze
-- CC
[207167] = "disorient", -- Blinding Sleet
[91807] = "root", -- Shambling Rush
[204085] = "root", -- Deathchill
[91797] = "stun", -- Monstrous Blow
[91800] = "stun", -- Gnaw
[108194] = "stun", -- Asphyxiate (Unholy)
[221562] = "stun", -- Asphyxiate (Blood)
[287254] = "stun", -- Dead of Winter
[207165] = "stun", -- Abomination's Might
[210141] = "stun", -- Zombie Explosion
[108199] = "knockback", -- Gorefiend's Grasp
-- Defensive
[48707] = "defensive", -- Anti-Magic Shell
[48792] = "defensive", -- Icebound Fortitude
[55233] = "defensive", -- Vampiric Blood
[49028] = "defensive", -- Dancing Rune Weapon
[49039] = "defensive", -- Lichborne
[194679] = "defensive", -- Rune Tap
[81256] = "defensive", -- Dancing Rune Weapon (Blood)
[219809] = "defensive", -- Tombstone
-- Offensive
[51271] = "offensive_cd", -- Pillar of Frost
[47568] = "offensive_cd", -- Empower Rune Weapon
[207289] = "offensive_cd", -- Unholy Assault
[49206] = "offensive_cd", -- Summon Gargoyle
[42650] = "offensive_cd", -- Army of the Dead
[315443] = "offensive_cd", -- Abomination Limb
[152279] = "offensive_cd", -- Breath of Sindragosa
[279302] = "offensive_cd", -- Frostwyrm's Fury
},
DEMONHUNTER = {
-- Interrupt
[183752] = "interrupt", -- Disrupt
-- CC
[204490] = "silence", -- Sigil of Silence
[179057] = "stun", -- Chaos Nova
[200166] = "stun", -- Metamorphosis (Veng)
[205630] = "stun", -- Illidan's Grasp
[208618] = "stun", -- Illidan's Grasp (thrown)
[211881] = "stun", -- Fel Eruption
[213491] = "stun", -- Demonic Trample
[207685] = "disorient", -- Sigil of Misery
[217832] = "incapacitate", -- Imprison
[221527] = "incapacitate", -- Imprison (honor)
-- Defensive
[198589] = "defensive", -- Blur
[196718] = "defensive", -- Darkness
[196555] = "defensive", -- Netherwalk
[187827] = "defensive", -- Metamorphosis (Veng defensive)
[203720] = "defensive", -- Demon Spikes
[204021] = "defensive", -- Fiery Brand
[263648] = "defensive", -- Soul Barrier
-- Offensive
[191427] = "offensive_cd", -- Metamorphosis (Havoc)
[258925] = "offensive_cd", -- Fel Barrage
[323639] = "offensive_cd", -- The Hunt
[390163] = "offensive_cd", -- Elysian Decree
},
DRUID = {
-- Interrupt
[78675] = "interrupt", -- Solar Beam
[106839] = "interrupt", -- Skull Bash
-- CC
[5211] = "stun", -- Mighty Bash
[163505] = "stun", -- Rake
[202244] = "stun", -- Overrun
[203123] = "stun", -- Maim
[339] = "root", -- Entangling Roots
[45334] = "root", -- Immobilized
[102359] = "root", -- Mass Entanglement
[235963] = "root", -- Entangling Roots (Feral honor)
[33786] = "disorient", -- Cyclone
[99] = "incapacitate", -- Incapacitating Roar
[2637] = "incapacitate", -- Hibernate
-- Defensive
[22812] = "defensive", -- Barkskin
[61336] = "defensive", -- Survival Instincts
[102342] = "defensive", -- Ironbark
[22842] = "defensive", -- Frenzied Regeneration
[108238] = "defensive", -- Renewal
-- Offensive
[194223] = "offensive_cd", -- Celestial Alignment
[102560] = "offensive_cd", -- Incarnation: Chosen of Elune
[106951] = "offensive_cd", -- Berserk
[102543] = "offensive_cd", -- Incarnation: King of the Jungle
[102558] = "offensive_cd", -- Incarnation: Guardian of Ursoc
[391528] = "offensive_cd", -- Convoke the Spirits
[323764] = "offensive_cd", -- Convoke the Spirits (alt)
},
EVOKER = {
-- Interrupt
[351338] = "interrupt", -- Quell
-- CC
[355689] = "root", -- Landslide
-- Defensive
[363916] = "defensive", -- Obsidian Scales
[374348] = "defensive", -- Renewing Blaze
[374227] = "defensive", -- Zephyr
[370960] = "defensive", -- Emerald Communion
-- Offensive
[375087] = "offensive_cd", -- Dragonrage
[357210] = "offensive_cd", -- Deep Breath
[370553] = "offensive_cd", -- Tip the Scales
},
HUNTER = {
-- Interrupt
[147362] = "interrupt", -- Counter Shot
[187707] = "interrupt", -- Muzzle
-- CC
[24394] = "stun", -- Intimidation
[3355] = "incapacitate", -- Freezing Trap
[203337] = "incapacitate", -- Freezing Trap (Survival honor)
[213691] = "incapacitate", -- Scatter Shot
[117526] = "root", -- Binding Shot
[162480] = "root", -- Steel Trap
[190927] = "root", -- Harpoon
[212638] = "root", -- Tracker's Net
[236776] = "knockback", -- Hi-Explosive Trap
-- Defensive
[109304] = "defensive", -- Exhilaration
[186265] = "defensive", -- Aspect of the Turtle
[264735] = "defensive", -- Survival of the Fittest
[388035] = "defensive", -- Fortitude of the Bear
[53480] = "defensive", -- Roar of Sacrifice
-- Offensive
[19574] = "offensive_cd", -- Bestial Wrath
[193530] = "offensive_cd", -- Aspect of the Wild
[360952] = "offensive_cd", -- Coordinated Assault
[288613] = "offensive_cd", -- Trueshot
[201430] = "offensive_cd", -- Stampede
[259489] = "offensive_cd", -- Kill Command (Survival, resets)
},
MAGE = {
-- Interrupt
[2139] = "interrupt", -- Counterspell
-- CC
[122] = "root", -- Frost Nova
[33395] = "root", -- Freeze
[157997] = "root", -- Ice Nova
[228600] = "root", -- Glacial Spike
[31661] = "disorient", -- Dragon's Breath
[82691] = "incapacitate", -- Ring of Frost
[118] = "incapacitate", -- Polymorph
[28271] = "incapacitate", -- Polymorph (Turtle)
[28272] = "incapacitate", -- Polymorph (Pig)
[61305] = "incapacitate", -- Polymorph (Black Cat)
[61721] = "incapacitate", -- Polymorph (Rabbit)
[61780] = "incapacitate", -- Polymorph (Turkey)
[126819] = "incapacitate", -- Polymorph (Porcupine)
[161353] = "incapacitate", -- Polymorph (Polar Bear)
[161354] = "incapacitate", -- Polymorph (Monkey)
[161355] = "incapacitate", -- Polymorph (Penguin)
[161372] = "incapacitate", -- Polymorph (Peacock)
[277787] = "incapacitate", -- Polymorph (Direhorn)
[277792] = "incapacitate", -- Polymorph (Bumblebee)
[157980] = "knockback", -- Supernova
[157981] = "knockback", -- Blast Wave
-- Defensive
[45438] = "defensive", -- Ice Block
[342245] = "defensive", -- Alter Time
[55342] = "defensive", -- Mirror Image
[235313] = "defensive", -- Blazing Barrier
[11426] = "defensive", -- Ice Barrier
[235450] = "defensive", -- Prismatic Barrier
[110960] = "defensive", -- Greater Invisibility
-- Offensive
[190319] = "offensive_cd", -- Combustion
[12472] = "offensive_cd", -- Icy Veins
[365350] = "offensive_cd", -- Arcane Surge
[205025] = "offensive_cd", -- Presence of Mind
[153626] = "offensive_cd", -- Arcane Orb
},
MONK = {
-- Interrupt
[116705] = "interrupt", -- Spear Hand Strike
-- CC
[119381] = "stun", -- Leg Sweep
[202346] = "stun", -- Double Barrel
[115078] = "incapacitate", -- Paralysis
[116706] = "root", -- Disable
[324382] = "root", -- Clash
[198909] = "disorient", -- Song of Chi-Ji
[202274] = "disorient", -- Incendiary Brew
-- Defensive
[115203] = "defensive", -- Fortifying Brew
[115176] = "defensive", -- Zen Meditation
[122278] = "defensive", -- Dampen Harm
[122783] = "defensive", -- Diffuse Magic
[125174] = "defensive", -- Touch of Karma
[116849] = "defensive", -- Life Cocoon
-- Offensive
[137639] = "offensive_cd", -- Storm, Earth, and Fire
[123904] = "offensive_cd", -- Invoke Xuen
[152173] = "offensive_cd", -- Serenity
[116680] = "offensive_cd", -- Thunder Focus Tea
[325197] = "offensive_cd", -- Invoke Chi-Ji
[322118] = "offensive_cd", -- Invoke Yu'lon
},
PALADIN = {
-- Interrupt
[96231] = "interrupt", -- Rebuke
[31935] = "interrupt", -- Avenger's Shield
-- CC
[853] = "stun", -- Hammer of Justice
[205290] = "stun", -- Wake of Ashes
[20066] = "incapacitate", -- Repentance
[105421] = "disorient", -- Blinding Light
-- Defensive
[642] = "defensive", -- Divine Shield
[633] = "defensive", -- Lay on Hands
[1022] = "defensive", -- Blessing of Protection
[184662] = "defensive", -- Shield of Vengeance
[31850] = "defensive", -- Ardent Defender
[86659] = "defensive", -- Guardian of Ancient Kings
[498] = "defensive", -- Divine Protection
[6940] = "defensive", -- Blessing of Sacrifice
-- Offensive
[31884] = "offensive_cd", -- Avenging Wrath
[231895] = "offensive_cd", -- Crusade
[105809] = "offensive_cd", -- Holy Avenger
[343721] = "offensive_cd", -- Final Reckoning
[343527] = "offensive_cd", -- Execution Sentence
[216331] = "offensive_cd", -- Avenging Crusader
},
PRIEST = {
-- Interrupt
[15487] = "interrupt", -- Silence
-- CC
[8122] = "disorient", -- Psychic Scream
[226943] = "disorient", -- Mind Bomb
[605] = "disorient", -- Mind Control
[64044] = "stun", -- Psychic Horror
[200200] = "stun", -- Holy Word: Chastise (stun)
[200196] = "incapacitate", -- Holy Word: Chastise
[9484] = "incapacitate", -- Shackle Undead
-- Defensive
[19236] = "defensive", -- Desperate Prayer
[586] = "defensive", -- Fade
[47585] = "defensive", -- Dispersion
[33206] = "defensive", -- Pain Suppression
[47788] = "defensive", -- Guardian Spirit
[62618] = "defensive", -- Power Word: Barrier
[271466] = "defensive", -- Luminous Barrier
-- Offensive
[10060] = "offensive_cd", -- Power Infusion
[34433] = "offensive_cd", -- Shadowfiend
[200174] = "offensive_cd", -- Mindbender
[228260] = "offensive_cd", -- Void Eruption
[391109] = "offensive_cd", -- Dark Ascension
[194249] = "offensive_cd", -- Voidform
},
ROGUE = {
-- Interrupt
[1766] = "interrupt", -- Kick
-- CC
[408] = "stun", -- Kidney Shot
[1833] = "stun", -- Cheap Shot
[1776] = "incapacitate", -- Gouge
[6770] = "incapacitate", -- Sap
[2094] = "disorient", -- Blind
-- Defensive
[5277] = "defensive", -- Evasion
[31224] = "defensive", -- Cloak of Shadows
[1856] = "defensive", -- Vanish
[185311] = "defensive", -- Crimson Vial
[1966] = "defensive", -- Feint
-- Offensive
[13750] = "offensive_cd", -- Adrenaline Rush
[185313] = "offensive_cd", -- Shadow Dance
[121471] = "offensive_cd", -- Shadow Blades
[51690] = "offensive_cd", -- Killing Spree
[212283] = "offensive_cd", -- Symbols of Death
[360194] = "offensive_cd", -- Deathmark
[381802] = "offensive_cd", -- Flagellation
},
SHAMAN = {
-- Interrupt
[57994] = "interrupt", -- Wind Shear
-- CC
[118345] = "stun", -- Pulverize
[118905] = "stun", -- Static Charge
[204437] = "stun", -- Lightning Lasso
[204399] = "stun", -- Earthfury
[64695] = "root", -- Earthgrab
[51514] = "incapacitate", -- Hex
[197214] = "incapacitate", -- Sundering
[51490] = "knockback", -- Thunderstorm
-- Defensive
[108271] = "defensive", -- Astral Shift
[98008] = "defensive", -- Spirit Link Totem
[108280] = "defensive", -- Healing Tide Totem
[325174] = "defensive", -- Spirit Walk
[409293] = "defensive", -- Earth Wall Totem
-- Offensive
[114051] = "offensive_cd", -- Ascendance
[191634] = "offensive_cd", -- Stormkeeper
[384352] = "offensive_cd", -- Doom Winds
[51533] = "offensive_cd", -- Feral Spirit
[198067] = "offensive_cd", -- Fire Elemental
[192249] = "offensive_cd", -- Storm Elemental
},
WARLOCK = {
-- Interrupt
[19647] = "interrupt", -- Spell Lock
[119910] = "interrupt", -- Spell Lock (Command Demon)
[132409] = "interrupt", -- Spell Lock (Command Demon)
[212619] = "interrupt", -- Call Felhunter
-- CC
[22703] = "stun", -- Infernal Awakening
[30283] = "stun", -- Shadowfury
[89766] = "stun", -- Axe Toss
[213688] = "stun", -- Fel Cleave
[233582] = "root", -- Entrenched in Flame
[6358] = "disorient", -- Seduction
[261589] = "disorient", -- Seduction (talent)
[6789] = "incapacitate", -- Mortal Coil
[710] = "incapacitate", -- Banish
[118699] = "fear", -- Fear
-- Defensive
[104773] = "defensive", -- Unending Resolve
[108416] = "defensive", -- Dark Pact
-- Offensive
[1122] = "offensive_cd", -- Summon Infernal
[205180] = "offensive_cd", -- Summon Darkglare
[113858] = "offensive_cd", -- Dark Soul: Instability
[267217] = "offensive_cd", -- Nether Portal
[386997] = "offensive_cd", -- Soul Rot
[442726] = "offensive_cd", -- Malevolence
},
WARRIOR = {
-- Interrupt
[6552] = "interrupt", -- Pummel
-- CC
[5246] = "disorient", -- Intimidating Shout
[316593] = "disorient", -- Intimidating Shout (primary)
[316595] = "disorient", -- Intimidating Shout (secondary)
[105771] = "root", -- Charge
[199042] = "root", -- Thunderstruck
[132168] = "stun", -- Shockwave
[132169] = "stun", -- Storm Bolt
[199085] = "stun", -- Warpath
[206572] = "knockback", -- Dragon Charge
-- Defensive
[871] = "defensive", -- Shield Wall
[118038] = "defensive", -- Die by the Sword
[184364] = "defensive", -- Enraged Regeneration
[97462] = "defensive", -- Rallying Cry
[23920] = "defensive", -- Spell Reflection
[12975] = "defensive", -- Last Stand
[190456] = "defensive", -- Ignore Pain
-- Offensive
[1719] = "offensive_cd", -- Recklessness
[107574] = "offensive_cd", -- Avatar
[227847] = "offensive_cd", -- Bladestorm
[228920] = "offensive_cd", -- Ravager
[384318] = "offensive_cd", -- Thunderous Roar
[385059] = "offensive_cd", -- Odyn's Fury
},
}
-- Maps CC sub-categories to the broad "cc" role for grouping analysis
local CC_CATEGORIES = {
stun = true, disorient = true, incapacitate = true,
root = true, silence = true, fear = true, knockback = true,
}
-- WoW Forever: ranked class spells and rune abilities. Generated from the
-- client's spell tables (tools/gen_forever_spells.py); do not hand-edit.
local FOREVER_CLASS_SPELLS = {
DRUID = {
[1238122] = "interrupt", -- Feral Charge
[16979] = "interrupt", -- Feral Charge (Bear)
[410176] = "interrupt", -- Skull Bash
[5211] = "stun", [6798] = "stun", [8983] = "stun", -- Bash
[9005] = "stun", [9823] = "stun", [9827] = "stun", -- Pounce
[2637] = "incapacitate", [18657] = "incapacitate", [18658] = "incapacitate", -- Hibernate
[339] = "root", [1062] = "root", [5195] = "root", [5196] = "root", [9852] = "root", [9853] = "root", -- Entangling Roots
[16689] = "root", [16810] = "root", [16811] = "root", [16812] = "root", [16813] = "root", [17329] = "root", -- Nature's Grasp
[22812] = "defensive", -- Barkskin
[22842] = "defensive", [22845] = "defensive", -- Frenzied Regeneration
[408024] = "defensive", -- Survival Instincts
[417141] = "offensive_cd", -- Berserk
[17116] = "offensive_cd", -- Nature's Swiftness
[5217] = "offensive_cd", [417045] = "offensive_cd", -- Tiger's Fury
},
HUNTER = {
[19577] = "stun", -- Intimidation
[1499] = "incapacitate", [14310] = "incapacitate", [14311] = "incapacitate", -- Freezing Trap
[19503] = "disorient", -- Scatter Shot
[1513] = "fear", [14326] = "fear", [14327] = "fear", -- Scare Beast
[19306] = "root", [20909] = "root", [20910] = "root", [1242634] = "root", -- Counterattack
[19185] = "root", -- Entrapment
[1265887] = "root", [1265888] = "root", [1265890] = "root", [1265891] = "root", [1265892] = "root", -- Web
[19263] = "defensive", -- Deterrence
[5384] = "defensive", -- Feign Death
[19574] = "offensive_cd", -- Bestial Wrath
[3045] = "offensive_cd", -- Rapid Fire
},
MAGE = {
[2139] = "interrupt", -- Counterspell
[12355] = "stun", -- Impact
[118] = "incapacitate", [12824] = "incapacitate", [12825] = "incapacitate", [12826] = "incapacitate", [28271] = "incapacitate", [28272] = "incapacitate", -- Polymorph
[28270] = "incapacitate", -- Polymorph: Cow
[122] = "root", [865] = "root", [6131] = "root", [10230] = "root", -- Frost Nova
[12494] = "root", -- Frostbite
[11426] = "defensive", [13031] = "defensive", [13032] = "defensive", [13033] = "defensive", -- Ice Barrier
[11958] = "defensive", -- Ice Block
[1463] = "defensive", [8494] = "defensive", [8495] = "defensive", [10191] = "defensive", [10192] = "defensive", [10193] = "defensive", -- Mana Shield
[12042] = "offensive_cd", -- Arcane Power
[11129] = "offensive_cd", -- Combustion
[425121] = "offensive_cd", -- Icy Veins
[12043] = "offensive_cd", -- Presence of Mind
},
PALADIN = {
[425609] = "interrupt", -- Rebuke
[853] = "stun", [5588] = "stun", [5589] = "stun", [10308] = "stun", -- Hammer of Justice
[20164] = "stun", -- Seal of Justice
[20066] = "incapacitate", -- Repentance
[2878] = "fear", [5627] = "fear", [10326] = "fear", -- Turn Undead
[1022] = "defensive", [5599] = "defensive", [10278] = "defensive", -- Blessing of Protection
[498] = "defensive", [5573] = "defensive", -- Divine Protection
[642] = "defensive", [1020] = "defensive", -- Divine Shield
[633] = "defensive", [2800] = "defensive", [10310] = "defensive", -- Lay on Hands
[407788] = "offensive_cd", -- Avenging Wrath
[20216] = "offensive_cd", -- Divine Favor
},
PRIEST = {
[605] = "incapacitate", [10911] = "incapacitate", [10912] = "incapacitate", -- Mind Control
[9484] = "incapacitate", [9485] = "incapacitate", [10955] = "incapacitate", -- Shackle Undead
[1277455] = "disorient", -- Confounding Flash
[8122] = "fear", [8124] = "fear", [10888] = "fear", [10890] = "fear", -- Psychic Scream
[15487] = "silence", -- Silence
[1277331] = "root", [1277332] = "root", [1277333] = "root", [1277334] = "root", [1277335] = "root", -- Chastise
[13908] = "defensive", [19236] = "defensive", [19238] = "defensive", [19240] = "defensive", [19241] = "defensive", [19242] = "defensive", [19243] = "defensive", -- Desperate Prayer
[425294] = "defensive", -- Dispersion
[586] = "defensive", [9578] = "defensive", [9579] = "defensive", [9592] = "defensive", [10941] = "defensive", [10942] = "defensive", -- Fade
[402004] = "defensive", -- Pain Suppression
[14751] = "offensive_cd", -- Inner Focus
[10060] = "offensive_cd", -- Power Infusion
},
ROGUE = {
[1766] = "interrupt", [1767] = "interrupt", [1768] = "interrupt", [1769] = "interrupt", -- Kick
[400009] = "stun", -- Between the Eyes
[1833] = "stun", -- Cheap Shot
[408] = "stun", [8643] = "stun", -- Kidney Shot
[1776] = "incapacitate", [1777] = "incapacitate", [8629] = "incapacitate", [11285] = "incapacitate", [11286] = "incapacitate", -- Gouge
[2070] = "incapacitate", [6770] = "incapacitate", [11297] = "incapacitate", -- Sap
[2094] = "disorient", -- Blind
[5277] = "defensive", -- Evasion
[2983] = "defensive", [8696] = "defensive", [11305] = "defensive", -- Sprint
[1856] = "defensive", [1857] = "defensive", -- Vanish
[13750] = "offensive_cd", -- Adrenaline Rush
[13877] = "offensive_cd", -- Blade Flurry
[14177] = "offensive_cd", -- Cold Blood
},
SHAMAN = {
[8042] = "interrupt", [8044] = "interrupt", [8045] = "interrupt", [8046] = "interrupt", [10412] = "interrupt", [10413] = "interrupt", [10414] = "interrupt", -- Earth Shock
[8177] = "defensive", -- Grounding Totem
[16188] = "offensive_cd", -- Nature's Swiftness
},
WARLOCK = {
[19244] = "interrupt", [19647] = "interrupt", -- Spell Lock
[412788] = "stun", -- Demon Charge
[18093] = "stun", -- Pyroclasm
[710] = "incapacitate", [18647] = "incapacitate", -- Banish
[6358] = "incapacitate", -- Seduction
[1098] = "incapacitate", [11725] = "incapacitate", [11726] = "incapacitate", -- Subjugate Demon
[6789] = "fear", [17925] = "fear", [17926] = "fear", -- Death Coil
[5782] = "fear", [6213] = "fear", [6215] = "fear", -- Fear
[5484] = "fear", [17928] = "fear", -- Howl of Terror
[6229] = "defensive", [11739] = "defensive", [11740] = "defensive", [28610] = "defensive", -- Shadow Ward
[18288] = "offensive_cd", -- Amplify Curse
[425463] = "offensive_cd", -- Demonic Grace
[403789] = "offensive_cd", -- Metamorphosis
},
WARRIOR = {
[6552] = "interrupt", [6554] = "interrupt", -- Pummel
[72] = "interrupt", [1671] = "interrupt", [1672] = "interrupt", -- Shield Bash
[100] = "stun", [6178] = "stun", [11578] = "stun", -- Charge
[12809] = "stun", -- Concussion Blow
[20252] = "stun", [20616] = "stun", [20617] = "stun", -- Intercept
[440488] = "stun", -- Shockwave
[5246] = "fear", -- Intimidating Shout
[12975] = "defensive", [12976] = "defensive", -- Last Stand
[20230] = "defensive", -- Retaliation
[2565] = "defensive", -- Shield Block
[871] = "defensive", -- Shield Wall
[2687] = "offensive_cd", -- Bloodrage
[12328] = "offensive_cd", -- Death Wish
[1719] = "offensive_cd", -- Recklessness
[12292] = "offensive_cd", [12723] = "offensive_cd", -- Sweeping Strikes
},
}
-- Flattened lookup for the current player's class: spellID → category
local playerSpells = {}
local FindBaseSpellByID = FindBaseSpellByID
function SpellData:Initialize()
local _, className = UnitClass("player")
local classData = (ns.Utils.IS_FOREVER and FOREVER_CLASS_SPELLS or CLASS_SPELLS)[className]
if classData then
for spellID, category in pairs(classData) do
playerSpells[spellID] = category
end
end
end
local function Lookup(spellID)
local cat = playerSpells[spellID]
if cat then return cat end
if FindBaseSpellByID then
local baseID = FindBaseSpellByID(spellID)
if baseID and baseID ~= spellID then
return playerSpells[baseID]
end
end
return nil
end
function SpellData:GetSpellCategory(spellID)
return Lookup(spellID)
end
function SpellData:IsInterrupt(spellID)
return Lookup(spellID) == "interrupt"
end
function SpellData:IsCC(spellID)
local cat = Lookup(spellID)
return cat and cat ~= "interrupt" and not (cat == "defensive" or cat == "offensive_cd")
end
function SpellData:IsCCOrInterrupt(spellID)
local cat = Lookup(spellID)
return cat == "interrupt" or (cat and CC_CATEGORIES[cat])
end
-- Returns the broad role for grouping: "interrupt", "cc", "defensive", "offensive_cd", or nil
function SpellData:GetSpellRole(spellID)
local cat = Lookup(spellID)
if not cat then return nil end
if cat == "interrupt" then return "interrupt" end
if cat == "defensive" then return "defensive" end
if cat == "offensive_cd" then return "offensive_cd" end
if CC_CATEGORIES[cat] then return "cc" end
return nil
end