Hey,
Been trying to get a weak aura working that displays my total attack power, including the attack power generated by vengeance.
I found this WA custom function:
Code:
function ()
-- Update every second only
local now = GetTime();
WA_STATS_LAST_UP = WA_STATS_LAST_UP or now - 1;
if now >= WA_STATS_LAST_UP + 0.1 then
-- Shedule next update
WA_STATS_LAST_UP = now;
-- Current values
local apBase, apPlus, apNeg = UnitAttackPower("player");
-- Return text
WA_STATS_RETURN = string.format("AP: %.2f | %.2f | %.2f", apBase, apPlus, apNeg);
end
return WA_STATS_RETURN or "<no data>";
end
however it displays the AP in 3 parts, Base | Vengeance | Any debuff |
what I really want is just one number that totals those 3 values, played around a bit but tbh don't really know what I'm doing.
---------- Post added 2013-05-11 at 02:38 PM ----------
Fixed by my guildy:
Code:
function ()
-- Update every second only
local now = GetTime();
WA_STATS_LAST_UP = WA_STATS_LAST_UP or now - 1;
if now >= WA_STATS_LAST_UP + 0.1 then
-- Shedule next update
WA_STATS_LAST_UP = now;
-- Current values
local apBase, apPlus, apNeg = UnitAttackPower("player");
-- Return text
WA_STATS_RETURN = string.format("AP: %.2f", apBase + apPlus + apNeg);
end
return WA_STATS_RETURN or "<no data>";
end