From 7e910866452914265c9db9b5f2f0f6457debf9c5 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Thu, 26 Aug 2021 13:31:17 -0500 Subject: [PATCH] Make TipHooker access itself locally instead of globally (Fixes #29, fixes #48) --- libs/TipHooker-1.0/TipHooker-1.0.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/TipHooker-1.0/TipHooker-1.0.lua b/libs/TipHooker-1.0/TipHooker-1.0.lua index cef67c3..8a28379 100644 --- a/libs/TipHooker-1.0/TipHooker-1.0.lua +++ b/libs/TipHooker-1.0/TipHooker-1.0.lua @@ -267,12 +267,12 @@ local function CreateFrameHook(frameType, name, parent, inheritFrame) local tooltip = _G[name] for _, methodName in ipairs(MethodList[tipType]) do -- prevent double hooking by checking HookedFrames table - if (type(tooltip[methodName]) == "function") and (not _G.TipHooker.HookedFrames[name]) then - _G.TipHooker.HookedFrames[name] = true + if (type(tooltip[methodName]) == "function") and (not TipHooker.HookedFrames[name]) then + TipHooker.HookedFrames[name] = true hooksecurefunc(tooltip, methodName, Set[tipType]) end end - tinsert(_G.TipHooker.SupportedTooltips, tooltip) + tinsert(TipHooker.SupportedTooltips, tooltip) break end end