mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Returns the health deficit -- the equivalent of UnitHealthMax(unit) - UnitHealth(unit) -- in one native call, so healing addons don't call both engine getters and subtract in Lua every frame. One token resolve + two descriptor field reads (HEALTH +0x40, MAXHEALTH +0x58); no display divisor (health is stored at face value), clamped at 0. Tracks the engine's own UnitHealth/UnitHealthMax exactly in both forms: real values (player 3600-1 = 3599) and vanilla's percentage form for non-grouped units (target 100-85 = 15). Returns 0 for a valid-but-absent unit, matching UnitHealth's convention.