compat: make hooksecurefunc append by default

This commit is contained in:
shagu
2025-07-30 20:18:52 +02:00
parent 37a5f1a840
commit 73561eda4a
22 changed files with 45 additions and 45 deletions
+3 -3
View File
@@ -236,13 +236,13 @@ hooksecurefunc("CastSpell", function(id, bookType)
local rawEffect, rank = libspell.GetSpellInfo(id, bookType)
local duration = libdebuff:GetDuration(rawEffect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), rawEffect, duration, "player")
end, true)
end)
hooksecurefunc("CastSpellByName", function(effect, target)
local rawEffect, rank = libspell.GetSpellInfo(effect)
local duration = libdebuff:GetDuration(rawEffect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), rawEffect, duration, "player")
end, true)
end)
hooksecurefunc("UseAction", function(slot, target, button)
if GetActionText(slot) or not IsCurrentAction(slot) then return end
@@ -250,7 +250,7 @@ hooksecurefunc("UseAction", function(slot, target, button)
local rawEffect, rank = scanner:Line(1)
local duration = libdebuff:GetDuration(rawEffect, rank)
libdebuff:AddPending(UnitName("target"), UnitLevel("target"), rawEffect, duration, "player")
end, true)
end)
function libdebuff:UnitDebuff(unit, id)
local unitname = UnitName(unit)