Skip to content

Commit

Permalink
Make TipHooker access itself locally instead of globally (Fixes #29, f…
Browse files Browse the repository at this point in the history
…ixes #48)
  • Loading branch information
raethkcj committed Aug 26, 2021
1 parent 52d31b3 commit 7e91086
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/TipHooker-1.0/TipHooker-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e91086

Please sign in to comment.