If you want to include your max, for example "900k / 1.10m", use the first one. If you just want your current, use the second one. I have taken the liberty of making it so that if mana is under 10k, the full number displays, such as 9999. Not really necessary at 110, but relevant if you happen to use this weakaura on a low alt.
For all numbers displays on either, you'll see 1-9999, 10k-900k, and 0.90m and above.
Code:
function()
local current,max=UnitMana('player'),UnitManaMax('player')
if current<10000 then
-- do nothing
elseif current<900001 then
current=("%.0fk"):format(current/1000)
else
current=("%.2fm"):format(current/1000000)
end
if max<10000 then
-- do nothing
elseif max<900001 then
max=("%.0fk"):format(max/1000)
else
max=("%.2fm"):format(max/1000000)
end
return tostring(current).." / "..tostring(max)
end
Code:
function()
local current=UnitMana('player')
if current<10000 then
-- do nothing
elseif current<900001 then
current=("%.0fk"):format(current/1000)
else
current=("%.2fm"):format(current/1000000)
end
return current
end