From 703e93d02102795daafbdf3d3bb0f40db1400fb8 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 10 Aug 2025 16:52:28 +0200 Subject: [PATCH] compat: support up to 16 values in hooksecurefunc --- compat/vanilla.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compat/vanilla.lua b/compat/vanilla.lua index 54c980a9..abc817a5 100644 --- a/compat/vanilla.lua +++ b/compat/vanilla.lua @@ -46,15 +46,15 @@ function hooksecurefunc(tbl, name, func, prepend) pfUI.hooks[tostring(func)]["new"] = func if prepend then - pfUI.hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - pfUI.hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - return pfUI.hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) + pfUI.hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + pfUI.hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + return pfUI.hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) end else - pfUI.hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - local r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 = pfUI.hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - pfUI.hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) - return r1, r2, r3, r4, r5, r6, r7, r8, r9, r10 + pfUI.hooks[tostring(func)]["function"] = function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + local r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16 = pfUI.hooks[tostring(func)]["old"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + pfUI.hooks[tostring(func)]["new"](a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) + return r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16 end end