mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 11:10:00 +00:00
Modernize power-API usage onto ClassicAPI
- Replace all UnitMana/UnitManaMax calls with UnitPower/UnitPowerMax. The no-arg form returns the unit's primary power from the same field vanilla's UnitMana read, so these are behavior-preserving. Drops two dead UnitMana/UnitManaMax local caches in nameplates.lua. - Replace magic power-type numbers (0/1/2/3) with Enum.PowerType.Mana/Rage/ Focus/Energy in the GetUnitStats branches, the power-bar color block, the druid mana bar, GetStatusValue's powerdyn, and energytick's mode checks.
This commit is contained in:
@@ -15,8 +15,6 @@ pfUI:RegisterModule("nameplates", function ()
|
||||
local UnitCanAssist = UnitCanAssist
|
||||
local UnitHealth = UnitHealth
|
||||
local UnitHealthMax = UnitHealthMax
|
||||
local UnitMana = UnitMana
|
||||
local UnitManaMax = UnitManaMax
|
||||
local pairs = pairs
|
||||
local tonumber = tonumber
|
||||
local strlower = strlower
|
||||
|
||||
Reference in New Issue
Block a user