Hi myrroddin,
Thanks very much for your kind reply.
I have tried to implement your suggestion and to rewrite the code in this way:
Lua Code:
local ADDON = ...
local prgname = "|cffffd200ToolTipDisable|r"
local function hide(self)
print ("DEBUG: Hide")
self:Hide()
end
local function show(self)
print ("DEBUG: Show")
self:Show()
end
local f = CreateFrame("Frame")
f:SetScript("OnEvent", function(self, event, ...)
if event == "PLAYER_REGEN_DISABLED" then
hooksecurefunc(GameTooltip, "SetAction", hide)
end
if event == "PLAYER_REGEN_ENABLED" then
hooksecurefunc(GameTooltip, "SetAction", show);
end
end)
f:RegisterEvent("PLAYER_REGEN_DISABLED")
f:RegisterEvent("PLAYER_REGEN_ENABLED")
It HIDE the tooltips when I go in combat but it doesn't show again when I exit from it .
Mah.
I am investigating a little bit more.
EDIT:
It continues to print a sequence of
DEBUG: Hide
DEBUG: Show
DEBUG: Hide
DEBUG: Show
Like the 2 events fire each others one by one very fast after exiting from combat.