Skip to content

Commit cfab07f

Browse files
committed
Update LibDispel
1 parent 5ca7c8b commit cfab07f

File tree

1 file changed

+69
-18
lines changed

1 file changed

+69
-18
lines changed

Libs/LibDispel/LibDispel.lua

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
local MAJOR, MINOR = "LibDispel-1.0", 12
1+
local MAJOR, MINOR = "LibDispel-1.0", 14
22
assert(LibStub, MAJOR.." requires LibStub")
3+
34
local lib = LibStub:NewLibrary(MAJOR, MINOR)
45
if not lib then return end
56

@@ -8,6 +9,8 @@ local Classic = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
89
local Cata = WOW_PROJECT_ID == WOW_PROJECT_CATACLYSM_CLASSIC
910

1011
local next = next
12+
local wipe = wipe
13+
local CopyTable = CopyTable
1114
local CreateFrame = CreateFrame
1215
local GetTalentInfo = GetTalentInfo
1316
local IsPlayerSpell = IsPlayerSpell
@@ -16,27 +19,40 @@ local IsSpellKnownOrOverridesKnown = IsSpellKnownOrOverridesKnown
1619
local GetCVar = C_CVar.GetCVar
1720
local SetCVar = C_CVar.SetCVar
1821

19-
local DebuffColors = CopyTable(DebuffTypeColor)
20-
lib.DebuffTypeColor = DebuffColors
22+
local function GetList(name, data)
23+
local list = lib[name]
24+
if list then -- clear the existing list
25+
wipe(list)
26+
else
27+
list = {} -- create new list
28+
lib[name] = list -- add new list
29+
end
30+
31+
if data then -- import color data
32+
for key, value in next, data do
33+
if type(value) == 'table' then
34+
list[key] = CopyTable(value)
35+
else
36+
list[key] = value
37+
end
38+
end
39+
end
40+
41+
return list
42+
end
43+
44+
local BadList = GetList('BadList') -- Spells that backfire when dispelled
45+
local BleedList = GetList('BleedList') -- Contains spells classified as Bleeds
46+
local BlockList = GetList('BlockList') -- Spells blocked from AuraHighlight
47+
local DispelList = GetList('DispelList') -- List of types the player can dispel
48+
local DebuffColors = GetList('DebuffTypeColor', _G.DebuffTypeColor)
2149

2250
-- These dont exist in Blizzards color table
2351
DebuffColors.Bleed = { r = 1, g = 0.2, b = 0.6 }
2452
DebuffColors.EnemyNPC = { r = 0.9, g = 0.1, b = 0.1 }
2553
DebuffColors.BadDispel = { r = 0.05, g = 0.85, b = 0.94 }
2654
DebuffColors.Stealable = { r = 0.93, g = 0.91, b = 0.55 }
2755

28-
local DispelList = {} -- List of types the player can dispel
29-
lib.DispelList = DispelList
30-
31-
local BleedList = {} -- Contains spells classified as Bleeds
32-
lib.BleedList = BleedList
33-
34-
local BlockList = {} -- Spells blocked from AuraHighlight
35-
lib.BlockList = BlockList
36-
37-
local BadList = {} -- Spells that backfire when dispelled
38-
lib.BadList = BadList
39-
4056
if Retail then
4157
-- Bad to dispel spells
4258
BadList[34914] = "Vampiric Touch" -- horrifies
@@ -52,7 +68,7 @@ if Retail then
5268
BlockList[108220] = "Deep Corruption"
5369
BlockList[116095] = "Disable" -- slow
5470

55-
-- Bleed spells updated January 18th 2025 by Simpy for Patch 11.0.7
71+
-- Bleed spells updated March 9th 2025 by Simpy for Patch 11.1
5672
--- Combined lists (without duplicates, filter requiring either main or effect bleed):
5773
----> Apply Aura
5874
-----> Mechanic Bleeding: https://www.wowhead.com/spells/mechanic:15?filter=109;6;0
@@ -447,6 +463,7 @@ if Retail then
447463
BleedList[194639] = "Rending Claws"
448464
BleedList[194674] = "Barbed Spear"
449465
BleedList[195094] = "Coral Slash"
466+
BleedList[195279] = "Bind"
450467
BleedList[195506] = "Razorsharp Axe"
451468
BleedList[196111] = "Jagged Claws"
452469
BleedList[196122] = "Severing Swipe"
@@ -854,6 +871,7 @@ if Retail then
854871
BleedList[346823] = "Furious Cleave"
855872
BleedList[347227] = "Weighted Blade"
856873
BleedList[347716] = "Letter Opener"
874+
BleedList[347807] = "Barbed Arrow"
857875
BleedList[348074] = "Assailing Lance"
858876
BleedList[348385] = "Bloody Cleave"
859877
BleedList[348726] = "Lethal Shot"
@@ -892,6 +910,7 @@ if Retail then
892910
BleedList[361042] = "Hardlight Assassination"
893911
BleedList[361049] = "Bleeding Gash"
894912
BleedList[361756] = "Death Chakram"
913+
BleedList[362149] = "Ascended Phalanx"
895914
BleedList[362194] = "Suffering"
896915
BleedList[362819] = "Rend"
897916
BleedList[363124] = "Hardlight Assassination"
@@ -1105,7 +1124,6 @@ if Retail then
11051124
BleedList[447268] = "Skullsplitter"
11061125
BleedList[447272] = "Hurl Spear"
11071126
BleedList[448818] = "Scratch"
1108-
BleedList[449233] = "Cull the Herd"
11091127
BleedList[449585] = "Deep Cut"
11101128
BleedList[449886] = "Deephunter's Bloody Hook"
11111129
BleedList[449960] = "Fresh Cut"
@@ -1126,7 +1144,7 @@ if Retail then
11261144
BleedList[454539] = "Talon Swipe"
11271145
BleedList[454587] = "Serrated Teeth"
11281146
BleedList[454694] = "Headbutt"
1129-
BleedList[454783] = "Void Rift"
1147+
BleedList[454783] = "Devouring Rift"
11301148
BleedList[454922] = "Slashing Claws"
11311149
BleedList[454951] = "Skewer Flesh"
11321150
BleedList[455543] = "Crushing Claws"
@@ -1155,20 +1173,53 @@ if Retail then
11551173
BleedList[464358] = "Rend"
11561174
BleedList[464570] = "Toe-Slash"
11571175
BleedList[465089] = "Shrapnel Blast"
1176+
BleedList[465102] = "Sundering Bash"
1177+
BleedList[465189] = "Grievous Thrashing"
11581178
BleedList[465213] = "Bloody Slash"
11591179
BleedList[465223] = "Blood Tithe"
11601180
BleedList[465240] = "Blood Rush"
11611181
BleedList[465247] = "Leg Rip"
11621182
BleedList[465261] = "Perforate Flesh"
11631183
BleedList[465271] = "Heart Shot"
1184+
BleedList[465326] = "Rend Flesh"
1185+
BleedList[466606] = "Serrated Bite"
11641186
BleedList[467105] = "Ravenous Charge"
1187+
BleedList[468229] = "Slashing Prices"
11651188
BleedList[468457] = "Rend"
1189+
BleedList[468631] = "Harpoon"
11661190
BleedList[468873] = "Thrash"
11671191
BleedList[468885] = "Rip"
11681192
BleedList[468934] = "Rake"
1193+
BleedList[469391] = "Perforating Wound"
11691194
BleedList[469700] = "Stab"
1195+
BleedList[470005] = "Vicious Bite"
11701196
BleedList[470154] = "Latched On"
1197+
BleedList[470241] = "Shred"
1198+
BleedList[470383] = "Talon Shred"
11711199
BleedList[470632] = "Rend"
1200+
BleedList[470695] = "Mech-a-Zoomies"
1201+
BleedList[470903] = "Phantom Strikes"
1202+
BleedList[471076] = "Chomp"
1203+
BleedList[471442] = "Rabid Charge"
1204+
BleedList[472196] = "Rending Maul"
1205+
BleedList[472855] = "Shred"
1206+
BleedList[474201] = "Gore"
1207+
BleedList[474271] = "Drillstrike"
1208+
BleedList[1213141] = "Heavy Slash"
1209+
BleedList[1213803] = "Nailed"
1210+
BleedList[1213848] = "Wrecking Ball"
1211+
BleedList[1214068] = "Grievous Bite"
1212+
BleedList[1214653] = "Buzz-Saw"
1213+
BleedList[1215411] = "Puncture"
1214+
BleedList[1216056] = "Talon Shred"
1215+
BleedList[1216467] = "Lacerated"
1216+
BleedList[1217261] = "Screwed!"
1217+
BleedList[1217375] = "Merciless Blow"
1218+
BleedList[1217677] = "Flesh Wound"
1219+
BleedList[1218140] = "Junksaws"
1220+
BleedList[1218302] = "Punctured"
1221+
BleedList[1221386] = "Spearhead"
1222+
BleedList[1227293] = "Gushing Wound"
11721223
end
11731224

11741225
function lib:GetDebuffTypeColor()

0 commit comments

Comments
 (0)