chat: avoid vararg and unpack in hooks

switch to static vars due to previous memleaks because of a weird behaviour of the old lua engine
This commit is contained in:
shagu
2018-04-22 14:14:16 +02:00
parent 8b9d46f4b1
commit 6ec1ea1fe7
+2 -2
View File
@@ -764,7 +764,7 @@ pfUI:RegisterModule("chat", function ()
if not _G["ChatFrame"..i].HookAddMessage then
_G["ChatFrame"..i].HookAddMessage = _G["ChatFrame"..i].AddMessage
end
_G["ChatFrame"..i].AddMessage = function (frame, text, ...)
_G["ChatFrame"..i].AddMessage = function (frame, text, a1, a2, a3, a4, a5)
if text then
-- detect urls
@@ -825,7 +825,7 @@ pfUI:RegisterModule("chat", function ()
end
end
_G["ChatFrame"..i].HookAddMessage(frame, text, unpack(arg))
_G["ChatFrame"..i].HookAddMessage(frame, text, a1, a2, a3, a4, a5)
end
end
end