Update
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
19
NewAge/NameplateInfo/Hostility.lua
Normal file
19
NewAge/NameplateInfo/Hostility.lua
Normal 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
|
||||
1
NewAge/ScrollingText/export
Normal file
1
NewAge/ScrollingText/export
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user