turtle-health: add libdebuff patches for turtle wow
Thanks @geojak
This commit is contained in:
@@ -24,3 +24,28 @@ module.enable = function(self)
|
||||
TargetHPPercText:Hide()
|
||||
TargetHPPercText.Show = function() return end
|
||||
end
|
||||
|
||||
-- Turtle WoW specific libdebuff patches
|
||||
local libdebuff = ShaguTweaks.libdebuff
|
||||
local libdebuff_twow = CreateFrame("Frame")
|
||||
libdebuff_twow:RegisterEvent("CHAT_MSG_SPELL_SELF_DAMAGE")
|
||||
libdebuff_twow:SetScript("OnEvent", function()
|
||||
-- Break early on invalid data
|
||||
if not arg1 or not arg2 then return end
|
||||
|
||||
-- Holy Strike is a spell, but can refresh paladin judgements
|
||||
-- Credits to @geojak
|
||||
if string.find(arg1, "Holy Strike") then
|
||||
for seal in ShaguTweaks.L["judgements"] do
|
||||
local name = UnitName("target")
|
||||
local level = UnitLevel("target")
|
||||
if name and libdebuff.objects[name] then
|
||||
if level and libdebuff.objects[name][level] and libdebuff.objects[name][level][seal] then
|
||||
libdebuff:AddEffect(name, level, seal)
|
||||
elseif libdebuff.objects[name][0] and libdebuff.objects[name][0][seal] then
|
||||
libdebuff:AddEffect(name, 0, seal)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user