feat: Add Personal Auras module for tracking debuffs on the player

- Introduced a new module for Personal Auras that allows players to track selected debuffs on themselves in a movable frame.
- Implemented functionality to manage tracked debuffs, including adding and removing spells.
- Added options for configuring the appearance and behavior of the Personal Auras frame.
- Updated the readme to include information about the new Personal Auras feature.
This commit is contained in:
Torsten Brendgen
2026-04-12 00:04:34 +02:00
parent 01eeae9603
commit 391e581d32
11 changed files with 1034 additions and 5 deletions

View File

@@ -223,6 +223,17 @@ local defaults = {
announceAtSec = 5,
trackedBuffs = {},
},
personalAuras = {
enabled = false,
unlocked = false,
posX = 0,
posY = 120,
width = 260,
rowHeight = 24,
iconSize = 20,
fontSize = 12,
trackedDebuffs = {},
},
raidTimeline = {
enabled = false,
leadTime = 5,
@@ -1254,6 +1265,30 @@ local function NormalizeBuffEndingAnnouncerSettings(settings)
settings.trackedBuffs = normalized
end
local function NormalizePersonalAurasSettings(settings)
if type(settings) ~= "table" then return end
if settings.enabled == nil then settings.enabled = false end
settings.unlocked = settings.unlocked == true
settings.posX = NormalizeLayoutValue(settings.posX, -2000, 2000, 0)
settings.posY = NormalizeLayoutValue(settings.posY, -2000, 2000, 120)
settings.width = math.floor(NormalizeLayoutValue(settings.width, 160, 420, 260) + 0.5)
settings.rowHeight = math.floor(NormalizeLayoutValue(settings.rowHeight, 18, 42, 24) + 0.5)
settings.iconSize = math.floor(NormalizeLayoutValue(settings.iconSize, 14, 32, 20) + 0.5)
settings.fontSize = math.floor(NormalizeLayoutValue(settings.fontSize, 8, 24, 12) + 0.5)
if type(settings.trackedDebuffs) ~= "table" then
settings.trackedDebuffs = {}
return
end
local normalized = {}
for sid, value in pairs(settings.trackedDebuffs) do
local id = tonumber(sid)
if id and id > 0 and value ~= false and value ~= nil then
normalized[id] = true
end
end
settings.trackedDebuffs = normalized
end
local function NormalizeRaidTimelineSettings(settings)
if type(settings) ~= "table" then return end
if settings.enabled == nil then settings.enabled = false end
@@ -1691,6 +1726,8 @@ function HMGT:MigrateProfileSettings()
NormalizeMapOverlaySettings(p.mapOverlay)
p.buffEndingAnnouncer = p.buffEndingAnnouncer or {}
NormalizeBuffEndingAnnouncerSettings(p.buffEndingAnnouncer)
p.personalAuras = p.personalAuras or {}
NormalizePersonalAurasSettings(p.personalAuras)
p.raidTimeline = p.raidTimeline or {}
NormalizeRaidTimelineSettings(p.raidTimeline)
p.notes = p.notes or {}