mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
a31d10384b
GetUnitStats parsed the power type out of the bytes0 descriptor field and read each power slot via GetUnitField(guid, "powerN")/"maxPowerN", manually dividing rage by 10. ClassicAPI's UnitPower/UnitPowerMax read the same descriptor slots and apply the engine's own power-divisor table (rage /10, happiness scaling), so: powerType = UnitPowerType(unitstr) or 0 power = UnitPower(unitstr, powerType) maxPower = UnitPowerMax(unitstr, powerType) is equivalent and drops nine GetUnitField calls plus the bytes0 parsing. Power now resolves through the hard-dep ClassicAPI even without Nampower; GetUnitField in this path is left only for health, which has no ClassicAPI real-HP equivalent.