Skip to content

Add Combat Timer as a DataBar widget - #1902

Open
KechhaTV wants to merge 4 commits into
EllesmereGaming:mainfrom
KechhaTV:main
Open

Add Combat Timer as a DataBar widget#1902
KechhaTV wants to merge 4 commits into
EllesmereGaming:mainfrom
KechhaTV:main

Conversation

@KechhaTV

@KechhaTV KechhaTV commented Sep 1, 2026

Copy link
Copy Markdown

What does this PR do?

Adds a new Combat Timer widget to the DataBars module.

The timer uses Blizzard's Damage Meter session data to display the current combat duration independently of the EllesmereUI Damage Meters module. It uses a combat-only heartbeat to keep the displayed duration updated, following the same approach as the existing Standalone Combat Timer in the Damage Meter module.

This brings the existing Combat Timer functionality to DataBars while allowing it to benefit from the DataBar system's existing layout, styling, and customization options.

How was it tested?

  • Added the Combat Timer through the DataBars configuration.
  • Verified that the timer starts updating when entering combat.
  • Verified that the displayed duration matches the Blizzard Damage Meter session duration.
  • Verified that the timer continues to work with EllesmereUI Damage Meters disabled.
  • Verified that the timer stops updating when leaving combat and retains the final session duration.
  • Verified that the DataBar can be removed/reconfigured normally.

Screenshots

Screenshot_1 Screenshot_2 Screenshot_3

Checklist

  • New settings default OFF (no behavior change without opt-in)
  • [N/A] Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built
    This does not fully apply to the DataBar implementation. Once the Combat Timer widget is added to a DataBar, its event frame is created and the relevant Damage Meter events are registered. The refresh heartbeat itself is only active while in combat and is stopped immediately when leaving combat. When the widget is not enabled/used, it has no associated events, polling, or update work.
  • [N/A] Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations).
    This does not apply to this implementation. The Combat Timer intentionally follows the same update approach as the existing Standalone Combat Timer in the Damage Meter module. The purpose of this PR is to replicate that functionality as a DataBar widget, while making it available within the DataBar system for increased customization and integration with existing DataBar styling and layout options.
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames
  • Tested in-game on live; no version gates or pre-Midnight APIs added

added CombatTimer defaults
added Logic for combatTimer dataBar
added "show only in combat" toggle for combat timer DataBar and EST_LEN entry for combatTimer DataBar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant