Code:
function ()
local now = GetTime();
WA_STATS_LAST_UP = WA_STATS_LAST_UP or now - 1;
if now >= WA_STATS_LAST_UP + 0.1 then
WA_STATS_LAST_UP = now;
local int = select(1, UnitStat("player", 4));
local mas = GetMasteryEffect();
local has = UnitSpellHaste("player");
local crit = GetSpellCritChance(6);
local dmg = GetSpellBonusDamage(6);
WA_STATS_RETURN = string.format([[
Int: %.0f
Mastery: %.1f
Haste: %.1f
Crit: %.1f
Damage: %.0f]],
int or 0,
mas or 0,
has or 0,
cri or 0,
dmg or 0
);
end
return WA_STATS_RETURN or "<no data>";
end
a working function that include stats in %, tested in 5.4