mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
api: add arguments to hook script
This commit is contained in:
+3
-3
@@ -382,9 +382,9 @@ end
|
||||
-- 'func' [function] the function that should be added
|
||||
function HookScript(f, script, func)
|
||||
local prev = f:GetScript(script)
|
||||
f:SetScript(script, function()
|
||||
if prev then prev() end
|
||||
func()
|
||||
f:SetScript(script, function(a1,a2,a3,a4,a5,a6,a7,a8,a9)
|
||||
if prev then prev(a1,a2,a3,a4,a5,a6,a7,a8,a9) end
|
||||
func(a1,a2,a3,a4,a5,a6,a7,a8,a9)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user