Thread: Stuf texts
View Single Post
01-23-13, 03:16 PM   #5
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Waky was kind enough to work on this and send it to me in a pm, wanted to post the end product, to show appreciation for his time and effort, this text string is pure coolness~

Code:
function(unit, cache, textframe)
if (UnitAffectingCombat("player") or GetMouseFocus():GetName()==("Stuf.units."..unit)) then
  if (cache.perchp<99) then
    return string.format("%d%%%% > %d",cache.perchp,cache.percmp);
  else
    return string.format("%d > %d",cache.curhp,cache.percmp);
  end
end
end
You'll have to check both frequent updates and show only on mouse over for this to work.
__________________

Last edited by Kendian : 01-23-13 at 03:18 PM. Reason: spellcheck
  Reply With Quote