I know. A method to group all potions in a potion cooldown is the way to go.
There is a problem, all Fellwood stuff can be Type: Consumable; SubType: Consumable and shares cooldown with Demonic/Dark Rune, which are Type: Trade Goods; SubType Trade Goods. Otherwise, all consumables with a cooldown share the same potions cooldown and have Type: Consumable; SubType: Consumable.
later edit: CooldownTimers shares the same problem. Of course, you can define a group of items on the same CD, add all potions to it and it is fine.
Doing this automatically kinda sux because of the stuff above :)
This should allow any equiped item to work EVEN if you don't have it on any default action button. For example I'm using ItemRack for all my trinkets, so oCD can't intercept them with the code in else ... end.
elseif(string.sub(bar, 1, 14) == "ContainerFrame") then
local slot = getglobal(this:GetParent():GetName())
local bag = getglobal(this:GetParent():GetParent():GetName())
local inventoryLink = GetContainerItemLink(bag:GetID(), slot:GetID())
local _, _, itemCode = strfind(inventoryLink, "(%d+):")
local sName, _, _, _, _, _, _, _, sTexture = GetItemInfo(itemCode)
self:Debug("ContainerFrame Item - %s: %s / %s - %s | Texture: %s", sName, start, GetTime(), duration, sTexture)
self:StartBar(sName, duration - (GetTime() - start), sName, sTexture)
Inventory items (mostly for stuff that can be used but not equiped or stuff that was used before a relog/reloadui). Ofc, the previous if was commented out :)
I currently have around 120 addons. Before I switched to Ace addons (Fubar, oRA, BigWigs, etc) I was using 68 MB Ram. Now I'm using 32 MB ram without losing any functionality. That's on top of a big FPS improvment.
CDT is kinda bloated but, by looking at both CDT and OCD code, I would use neither. Omni Cooldown Count seems to be the cleanest one, too bad the author didn't make a bars module but that can be added :)