This commit is contained in:
2025-05-16 10:02:52 +02:00
parent 9962841a01
commit d79e9844d7
4 changed files with 33 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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

View File

@@ -0,0 +1,19 @@
--- NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED
function(allstates, e, ...)
---@cast allstates allstates
print("Starting to process nameplates for hostility...")
for i = 1, 40 do
local unit = "nameplate" .. i
local hostile = UnitCanAttack("player", unit)
allstates[unit] = {
show = true,
changed = true,
resort = true,
hostile = hostile,
}
print("Processed nameplate " .. i .. " hostility: " .. tostring(hostile))
end
print("Finished processing nameplates for hostility.")
return true
end

File diff suppressed because one or more lines are too long