Kenzi's Druid Mana Bar

Displays the druid mana bar while in bear or cat form.

File Details

1.3.0-classic/tbc

  • R
  • Jun 28, 2026
  • 2.83 KB
  • 538
  • 2.5.6+1
  • Classic + 1

File Name

1.2.2.zip

Supported Versions

  • 2.5.6
  • 1.15.8

Header

  • Added version tag v1.2.2
  • Updated copyright year to 2025-2026
  • Condensed bug report to one line (Bug reports: <url>)

Performance / correctness

  • UnitClass("player") cached at module load into playerClass — was called on every shapeshift event
  • IsInShapeshiftForm now short-circuits on class check before calling GetShapeshiftFormID()
  • Event handler no longer calls IsInShapeshiftForm() redundantly before UpdateManaBar() (which already calls it)
  • TRANSPARENCIES and SCALES tables hoisted to module scope — were being allocated fresh on every menu open

Simplifications

  • dragArea:SetSize(116, 10) removed — SetAllPoints already sizes it
  • OnDragStart / OnDragStop closures no longer capture unused self
  • LoadSettings uses or default idiom; KDMB_SavedSettings initialized in a single expression
  • UpdateManaText condensed to one string.format call
  • UpdateManaBar uses early return instead of nested else
  • OnEnter and OnLeave now both call UpdateManaText() — duplicate format string removed
  • Event handler split into clean per-event elseif branches

Style

  • All inline comments removed
  • info field assignments in context menu reordered for clarity (textcheckedfunc pattern)