Repository navigation
1.7
v1.7 — Progress Bars, Buff Aura Mode & Template Browser
🆕 Progress Bar Display Mode (NEW)
- Per-aura display type: Each tracked aura can now individually be set to Icon or Progress Bar via a new "Display Type" dropdown in the detail panel.
- Bars feature a smooth fill animation at 60 fps with a moving spark indicator.
- Fill direction: Left→Right, Right→Left, Bottom→Top (vertical), Top→Bottom (vertical).
- Icon attachment: Optional spell icon on the bar with position options (Left / Right / Top / Bottom).
- Customizable: Width, height, font size, bar color (via color picker), spell name display, timer text, and spark toggle — all per-aura.
- Bar rendering uses
issecretvalueguards on all timing reads — fully Midnight 12.0 safe. - Dedicated 60 fps
MSWA_BarTickerwith automatic sleep when no bars are visible (zero idle CPU).
🆕 Buff Aura Tracking Mode (NEW)
- New "Buff Aura" aura mode (
BUFF_AURA) for tracking player buffs directly — similar to WeakAuras/EQoL. - Uses the EQoL
GetUnitAuraspattern:C_UnitAuras.GetUnitAuras("player","HELPFUL")returns whitelisted, readable fields — no secret value issues. - Per-frame buff cache:
GetUnitAurasis called once per frame and the result is shared across all BUFF_AURA icons (zero redundant API calls). - Cache invalidated on
UNIT_AURAevents via the newMSWA_BuffEventFramerelay. - Show When Absent: Option to display the icon even when the buff is missing — with configurable alpha and desaturation.
- Stack display: Native stack count rendering with
issecretvalueguards. - Reminder Threshold: Optional "minutes remaining" threshold — hides the icon when the buff has more time left than the threshold (useful for "re-apply soon" reminders).
- Full
issecretvaluepattern on all duration/expiration fields — secret values route directly toSetCooldownFromExpirationTime, non-secret values use preciseSetCooldown. - New module MSA_BuffBridge.lua: Provides display-data resolution, absent/active styling, tooltip enrichment, and group-level buff counting.
🆕 Template Browser (NEW)
- Professional 3-panel template browser UI: category list → template list → detail panel with per-spell checkboxes.
- 11 built-in categories: Healer HoTs, Augmentation Evoker, Raid Buffs, Blessing of Bronze, Self Buffs, Rogue Poisons, Shaman Imbuements, Resource Auras, Your Cooldowns, Your Spellbook, Your Bags.
- Dynamic categories: "Your Cooldowns", "Your Spellbook", and "Your Bags" perform a one-time out-of-combat spellbook + bag scan to show only spells/items your character actually has.
- Per-spell selection before install via checkboxes + Select All / Deselect All.
- Install / Reinstall / Uninstall support.
- Accessible from the Options panel header button and via
/msa templates. - 100% secret-safe, zero pcall.
🆕 Rekey Aura (Change Spell/Item ID)
- New "Spell/Item ID" edit box in the detail panel lets you change the tracked spell or item ID of any existing aura without losing settings.
- Preserves all settings: spellSettings, trackedSpells/trackedItems, customNames, group assignment (including
groupMembersarray), and current selection. - Collision detection: Prevents overwriting an existing aura with the same ID.
- Hidden for draft entries.
🆕 Decimal Timer Rendering (NEW)
- The existing "Show decimal" checkbox now actually renders a custom decimal timer overlay (e.g.
3.7instead of4) for cooldowns under 10 seconds. - Lazy-created
_msaDecimalTimerFontString per icon — only allocated when the feature is enabled. - Uses
MSWA_FormatTimerfor consistent formatting. - Automatically hidden when bars are active (bars have their own timer text).
⚡ Performance & Engine Improvements
Secret Value Handling — Zero pcall Hot Path
- Removed all
pcallwrappers from cooldown apply functions. Blizzard's C-side APIs (SetCooldown,SetCooldownFromExpirationTime) natively accept secret values —pcallwas unnecessary overhead. - Replaced with
issecretvalueguards: secret values →SetCooldownFromExpirationTime(designed for secrets), non-secret values →SetCooldownwith precise Lua-side arithmetic. - Readable values are cached on the cooldown frame (
__mswaExp,__mswaDur,__mswaStart) for the decimal timer — secret values are stored asnil(safe fallback).
Aura API Rewrite — EQoL Pattern
GetAuraDataBySpellIDremoved (does not exist in Midnight 12.0).GetAuraDataByAuraInstanceIDremoved (returns ALL fields as secret).- Replaced with the EQoL-proven two-tier approach:
- Primary:
C_UnitAuras.GetUnitAuras("player","HELPFUL")→ whitelisted readable table. - Fallback:
C_UnitAuras.GetPlayerAuraBySpellID(sid)for targeted lookups.
- Primary:
- Per-frame
_buffCachewithGetTime()-keyed invalidation — single API call shared across all aura icons.
Version Display
- Version string is now read dynamically from the
.tocmetadata viaC_AddOns.GetAddOnMetadatawithpcallfallback — no more hardcoded version numbers.
🗄️ Database
- Schema version bumped to 6 with automatic migration.
- New fields in
spellSettings:auraMode = "BUFF_AURA",auraSpellID,auraUnit,auraFilter,showWhenAbsent,desaturateOnAbsent,alphaOnAbsent,showStacks,displayType,barWidth,barHeight,barFontSize,barColor,barShowName,barShowTimer,barShowSpark,barShowIcon,barIconPos,barFillDir,reminderThresholdMin,hideStacksOnCooldown. - New top-level table:
db.groupMembersfor ordered group membership tracking.
🔧 Options Panel
- Display Type dropdown: Icon / Progress Bar selector with dynamic bar settings sub-panel.
- Bar settings: Width, height, font size, color swatch, name/timer/spark/icon toggles, icon position dropdown, fill direction dropdown.
- Buff Aura section: Checkbox to enable BUFF_AURA mode with sub-options for Show When Absent, Desaturate, Show Stacks, Alpha, Reminder Threshold.
- Hide stacks on cooldown: New checkbox in the stack settings section.
- Rekey controls: Spell/Item ID edit box + Apply button with validation feedback.
- Template Browser button in the header bar.
- Aura list tags:
[Buff Aura]tag shown next to BUFF_AURA entries in the spell list.