Here's a little snippet you guys can use with Ironskin Brew/Purifying Brew icons. Just create a Text display, set it to %c and,the function in and set a trigger like player health so it's always running.
Code:
function()
if REDS_WA_BREW ~= nil then
REDS_WA_BREW = {}
end
local spellName = "Ironskin Brew"
local charges, maxCharges, start, duration = GetSpellCharges(spellName)
local time = start + duration - GetTime()
local _, _, _, _, _, _, expirationTime = UnitBuff("player", "Ironskin Brew")
local auraduration = '\n'
local auraduration_pretty, time_pretty
if expirationTime then
auraduration = expirationTime - GetTime()
auraduration = string.format("%.0f", auraduration)
auraduration_pretty = "\n" .. auraduration .. "s"
end
if time < duration then
time = string.format("%.0f", time)
time_pretty = "/" .. time
else
time = ''
end
REDS_WA_BREW.charges = charges
REDS_WA_BREW.duration = auraduration
REDS_WA_BREW.cd = time
REDS_WA_BREW.all = charges .. time_pretty .. auraduration_pretty
end
Afterwards you can use the set globals provided by the custom text display by setting any display text to %c and putting this to custom function:
Code:
function()
if REDS_WA_BREW then return REDS_WA_BREW.all end
end
If you just want partial info, they are stored in REDS_WA_BREW.cd REDS_WA_BREW.duration and REDS_WA_BREW.charges