20 lines
556 B
Lua
20 lines
556 B
Lua
function()
|
|
local net = aura_env.totalHealAbsorb * 1.5 - aura_env.totalDmgAbsorb;
|
|
-- Use player HP to gauge the limits of the progress bar.
|
|
-- Seems reasonable for now. Maybe want to stick some multipliers on.
|
|
local hp = UnitHealth("player")
|
|
|
|
if WeakAuras.IsOptionsOpen() then
|
|
aura_env.region:SetDurationInfo(0, hp, true)
|
|
return
|
|
end
|
|
|
|
if (net < 0 ) then
|
|
aura_env.region:SetDurationInfo(-net, hp, true)
|
|
return
|
|
else
|
|
aura_env.region:SetDurationInfo(0, hp, true)
|
|
return
|
|
end
|
|
end
|