Skip to content

1.7

Choose a tag to compare

@Mapkov2 Mapkov2 released this 28 Feb 00:13
· 43 commits to main since this release
131889a

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 issecretvalue guards on all timing reads — fully Midnight 12.0 safe.
  • Dedicated 60 fps MSWA_BarTicker with 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 GetUnitAuras pattern: C_UnitAuras.GetUnitAuras("player","HELPFUL") returns whitelisted, readable fields — no secret value issues.
  • Per-frame buff cache: GetUnitAuras is called once per frame and the result is shared across all BUFF_AURA icons (zero redundant API calls).
  • Cache invalidated on UNIT_AURA events via the new MSWA_BuffEventFrame relay.
  • 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 issecretvalue guards.
  • 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 issecretvalue pattern on all duration/expiration fields — secret values route directly to SetCooldownFromExpirationTime, non-secret values use precise SetCooldown.
  • 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 groupMembers array), 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.7 instead of 4) for cooldowns under 10 seconds.
  • Lazy-created _msaDecimalTimer FontString per icon — only allocated when the feature is enabled.
  • Uses MSWA_FormatTimer for 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 pcall wrappers from cooldown apply functions. Blizzard's C-side APIs (SetCooldown, SetCooldownFromExpirationTime) natively accept secret values — pcall was unnecessary overhead.
  • Replaced with issecretvalue guards: secret values → SetCooldownFromExpirationTime (designed for secrets), non-secret values → SetCooldown with precise Lua-side arithmetic.
  • Readable values are cached on the cooldown frame (__mswaExp, __mswaDur, __mswaStart) for the decimal timer — secret values are stored as nil (safe fallback).

Aura API Rewrite — EQoL Pattern

  • GetAuraDataBySpellID removed (does not exist in Midnight 12.0).
  • GetAuraDataByAuraInstanceID removed (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.
  • Per-frame _buffCache with GetTime()-keyed invalidation — single API call shared across all aura icons.

Version Display

  • Version string is now read dynamically from the .toc metadata via C_AddOns.GetAddOnMetadata with pcall fallback — 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.groupMembers for 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.