api: add HookScript back to the core api

This commit is contained in:
shagu
2019-04-14 15:15:10 +02:00
parent fa16bbb029
commit 597f19dd55
2 changed files with 13 additions and 8 deletions
-8
View File
@@ -48,11 +48,3 @@ function hooksecurefunc(name, func, append)
_G[name] = pfUI.hooks[tostring(func)]["function"]
end
function HookScript(f, script, func)
local prev = f:GetScript(script)
f:SetScript(script, function()
if prev then prev() end
func()
end)
end