Skip to content

How to add OmniCC support to my addons?

João Cardoso edited this page May 23, 2016 · 2 revisions

You don't have to do anything for OmniCC to work with your addon. It should work straight out of the box and display itself on any cooldown model.

Explanation

OmniCC hooks into the Cooldown frame class. Whenever :SetCooldownis called on a Cooldown frame, OmniCC starts tracking its duration and displays a text countdown over it.

local myCooldown = CreateFrame('Cooldown', 'MyCooldownName', ...)
myCooldown:SetCooldown(start, duration) -- OmniCC starts displaying text countdown until cooldown finishes

OmniCC does this by making a secure hook into the Cooldown frame class metatable. Hence, there is no risk of tainting code.

Clone this wiki locally