Originally Posted by LudiusMaximus
But I never see the print of my hook...
Am I missing something?
|
That function runs before your code ever has a chance to hook it.
You need something like:
Lua Code:
local function SetIgnoreParentAlpha(_, frame)
frame:SetIgnoreParentAlpha(true)
end
for _, subSystem in pairs(AlertFrame.alertFrameSubSystems) do
local pool = type(subSystem) == 'table' and subSystem.alertFramePool
if type(pool) == 'table' and type(pool.resetterFunc) == 'function' then
hooksecurefunc(pool, "resetterFunc", SetIgnoreParentAlpha)
end
end
Here is an easy way to test it:
Code:
/run UIParent:SetAlpha(0.5); NewMountAlertSystem:ShowAlert("123")