Hi,
im creating a new micro menu and wanted to use the click functions (to avoid taints).
It is working for all micro menu buttons except character.
When I do:
Lua Code:
CharacterMicroButton:Click()
Nothing happens...
Is there somethign special about this button?
*EDIT*
Nevermind. They taint anyway. Since ShowUIPanel and HideUIPanel are forbidden in fight now I tried to do the following:
Lua Code:
local function showUIPanel(frame, _, duplicated)
if (frame and not frame:IsShown() and (not duplicated) and InCombatLockdown()) then
local point, _, relativePoint, xOff, yOff = frame:GetPoint()
frame:ClearAllPoints()
frame:SetPoint(point or "CENTER", FRAMES.UIParent, relativePoint or "CENTER", xOff or 0, yOff or 0)
frame:Show()
end
end
local function hideUIPanel(frame, _, duplicated)
if (frame and frame:IsShown() and (not duplicated) and InCombatLockdown()) then
frame:Hide()
end
end
hooksecurefunc("ShowUIPanel", function(frame, force, duplicated)
showUIPanel(frame, force, duplicated)
end)
hooksecurefunc("HideUIPanel", function(frame, force, duplicated)
hideUIPanel(frame, force, duplicated)
end)
This is working for most of the buttons but for example not for the spell book frame.
Is there any way to get this working without any taints or is the way to go:
"This is not allowed during combat!"?