helpers: make hooksecurefunc append by default

This commit is contained in:
shagu
2025-07-30 20:26:29 +02:00
parent 3d963c851f
commit 344354d975
7 changed files with 17 additions and 19 deletions
+3 -3
View File
@@ -224,13 +224,13 @@ hooksecurefunc("CastSpell", function(id, bookType)
local _, rank = libspell.GetSpellInfo(id, bookType)
local duration = libdebuff:GetDuration(effect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), effect, duration)
end, true)
end)
hooksecurefunc("CastSpellByName", function(effect, target)
local _, rank = libspell.GetSpellInfo(effect)
local duration = libdebuff:GetDuration(effect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), effect, duration)
end, true)
end)
hooksecurefunc("UseAction", function(slot, target, button)
if GetActionText(slot) or not IsCurrentAction(slot) then return end
@@ -238,7 +238,7 @@ hooksecurefunc("UseAction", function(slot, target, button)
local effect, rank = scanner:Line(1)
local duration = libdebuff:GetDuration(effect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), effect, duration)
end, true)
end)
function libdebuff:UnitDebuff(unit, id)
local unitname = UnitName(unit)