Originally Posted by Eungavi
Let's say you have two addons which embeds their own copy of oUF.
One will replace all the unitframes (A) while the other will just draw an extra player unitframe on the center of the screen (B).
Do you reckon overriding a DisableBlizzard function in B would also affect one in A?
oUF doesn't use a LibStub, so I'm guessing that it won't affect each other tho...
(I can't test it myself atm )
|
Embedded oUF instances are their own addons, with their own space. Overwriting oUF internal functions will only affect each one, not both/all.
The only way it'd affect everything is if multiple layouts use the same unembedded oUF instance (which is why you should never override colors globally).
Another way to get what you want without modifying oUF source:
Lua Code:
-- store and disable the method
local orig = oUF.DisableBlizzard
oUF.DisableBlizzard = nop
-- spawn your frames
oUF:Spawn('player')
-- re-enable the method
oUF.DisableBlizzard = orig