Monday, April 16, 2012

Need advice with Candybar

Would someone advise me on how to best use candybar (or equivalent) timers?

I have added the timers to my addon, however, they are simply overlaying each other instead of stacking. Here is my lua:

if duration ~= nil then

if duration > 1.44 and enabled ~= 0 and WittyMage.db.profile.ShowSpellTimers and not active then



local color = WittyMage:FindSpellType(spellName)

local texture = GetSpellTexture(spellName, BOOKTYPE_SPELL)



if color == 1 then candybar:RegisterCandyBar(spellName.."CD", duration, spellName, texture, 0, 1, 0)

elseif color == 2 then candybar:RegisterCandyBar(spellName.."CD", duration, spellName, texture, 1, 0, 1)

elseif color == 3 then candybar:RegisterCandyBar(spellName.."CD", duration, spellName, texture, 1, 0, 0)

else candybar:RegisterCandyBar(spellName.."CD", duration, spellName, texture, 0, 0, 1)

end

candybar:SetCandyBarWidth(spellName.."CD", 135)

candybar:SetCandyBarHeight(spellName.."CD", 15)

candybar:RegisterCandyBarWithGroup(spellName.."CD", "Timers")

table.insert(WittyMage.Private.SpellTimers, spellName.."CD")

candybar:StartCandyBar(spellName.."CD", true)

candybar:SetCandyBarCompletion(spellName.."CD", TimerCompleted, spellName.."CD")

return candybar

end

end|||Nevermind, I figured it out.

No comments:

Post a Comment