Hi, I've found a thread about a post hook, where a funcion will be executed after another function call.
Code:
local postHook = function(funcName, callback)
local tmp = _G[funcName]
_G[funcName] = function(...)
tmp(...)
callback()
end
end
Is it possible to do the same with events? I would like to fire my function from the event EVENT_INVENTORY_SINGLE_SLOT_UPDATE.
But I need to be sure all other, or at least 1, addon(s) have executed their code already before my function will be called. Otherwise some data is missing or wrong.
I tried to do it with a simple zo_callLater () function, giving it 2 seconds time, but this is not working and seems not to be the good way :-)
Is there any way I can achieve this?
Thanks for your help.