Update
This commit is contained in:
@@ -37,6 +37,14 @@ aura_env.iconz[aura_env.types.BLEED] = 1033474
|
||||
--
|
||||
aura_env.fn.getMaxHealth = function() return UnitHealthMax("player") end
|
||||
|
||||
aura_env.fn.getMaxHit = function()
|
||||
local maxHit = 0
|
||||
for _, amount in pairs(aura_env.historyCurrent) do
|
||||
maxHit = maxHit + amount
|
||||
end
|
||||
return maxHit
|
||||
end
|
||||
|
||||
aura_env.fn.isEnabled = function(damageType)
|
||||
local enabled = damageType == aura_env.types.SWING and aura_env.config.enableSwing
|
||||
or damageType == aura_env.types.SPELL and aura_env.config.enableSpell
|
||||
@@ -131,7 +139,8 @@ end
|
||||
-- @return boolean
|
||||
--
|
||||
aura_env.fn.updateAllState = function(allStates)
|
||||
local maxHealth = aura_env.fn.getMaxHealth()
|
||||
-- local maxHealth = aura_env.fn.getMaxHealth()
|
||||
local maxHit = aura_env.fn.getMaxHit()
|
||||
|
||||
-- create progress bar records
|
||||
for idx, value in pairs(aura_env.historyCurrent) do
|
||||
@@ -142,13 +151,13 @@ aura_env.fn.updateAllState = function(allStates)
|
||||
progressType = "static",
|
||||
value = value,
|
||||
display = normalize(value),
|
||||
total = maxHealth,
|
||||
total = maxHit,
|
||||
type = idx,
|
||||
icon = aura_env.iconz[idx],
|
||||
duration = 3,
|
||||
autohide = true,
|
||||
}
|
||||
print(allStates[idx].display)
|
||||
--print(allStates[idx].display)
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user