I was looking through the OmniCC addon to find out how it hooks into the Cooldown functionality of Action Buttons.
I understand the theory - but the way it does it is either VERY clever or VERY obscure - I was hoping someone might explain it
The code is roughly
local methods = getmetatable(CreateFrame('Cooldown', nil, nil, 'CooldownFrameTemplate')).__index
hooksecurefunc(methods, 'SetCooldown', function(self, start, duration)
[function content here]
end)
What on EARTH is that getmetatable function returning - apart from 'a list of all the action buttons in the entire UI' - and how - what - where - who - when etc.