Add OverallAbsorbs which is pretty much a copy of NullBarrier

This commit is contained in:
PhatDave
2021-11-30 17:25:24 +01:00
parent 3b9c1133f6
commit f899e14ff8
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
aura_env.buffs = {
["Null Barrier"] = 1,
["Empowered Null Barrier"] = 1,
["Resounding Protection"] = 1,
["Guard"] = 1,
["Void Shroud"] = 1,
["Stoneskin"] = 1,
}
aura_env.max = 0
aura_env.GetBuff = function(name)
for i = 1, 40 do
if UnitBuff("player", i) == name then
return i
end
end
return 0
end
aura_env.GetAbsorb = function(name)
local temp = select(16, UnitBuff("player", aura_env.GetBuff(name)))
if temp then return temp else return 0 end
end
aura_env.GetAbsorbs = function()
local abs = 0
for k, v in pairs(aura_env.buffs) do
abs = abs + aura_env.GetAbsorb(k)
end
return abs
end
aura_env.PrettyPrintNum = function(n)
if n > 1e6 then
return string.format("%.2fM", n / 1e6)
elseif n > 1e3 then
return string.format("%.2fk", n / 1e3)
else
return n
end
end