Fuck with shit a bit

This commit is contained in:
2025-05-15 17:52:34 +02:00
parent 0f3fe4f7ee
commit c8653783ce
2 changed files with 17 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ aura_env.damageHistory = {}
aura_env.historyCurrent = {}
aura_env.playerGUID = UnitGUID("player")
aura_env.lastCleanup = 0
aura_env.historyWindow = 5
aura_env.historyWindow = 10
aura_env.cleanupInterval = 1
aura_env.types = {
SWING = "SWING_DAMAGE",
@@ -114,6 +114,18 @@ aura_env.fn.addDamageRecord = function(allStates, time, damageType, damage)
aura_env.fn.updateAllState(allStates)
end
local function normalize(value)
if value > 1e9 then
return string.format("%.2fB", value / 1e9)
elseif value > 1e6 then
return string.format("%.2fM", value / 1e6)
elseif value > 1e3 then
return string.format("%.2fk", value / 1e3)
else
return value
end
end
--
-- Updates the state table of the clone with the new damage.
-- @return boolean
@@ -129,12 +141,14 @@ aura_env.fn.updateAllState = function(allStates)
name = aura_env.labels[idx],
progressType = "static",
value = value,
display = normalize(value),
total = maxHealth,
type = idx,
icon = aura_env.iconz[idx],
duration = 3,
autohide = true,
}
print(allStates[idx].display)
end
return true

View File

@@ -10,5 +10,6 @@
["ENVIRONMENTAL_DAMAGE"] = "Environmental",
["BLEED"] = "Bleed",
}
}
},
display = "string"
}