feat: add UnitRage, UnitEnergy, UnitFocus, UnitRunicPower aliases

Register power-type-specific aliases (UnitRage, UnitEnergy, UnitFocus,
UnitRunicPower) that map to the existing lua_UnitPower function. Some
Classic/TBC addons call these directly instead of the generic UnitPower.
All return the unit's current power value regardless of type — the
underlying function reads from the entity's power field.
This commit is contained in:
Kelsi 2026-03-22 19:37:58 -07:00
parent 2f4065cea0
commit a70f42d4f6

View file

@ -4805,6 +4805,10 @@ void LuaEngine::registerCoreAPI() {
{"UnitPowerMax", lua_UnitPowerMax},
{"UnitMana", lua_UnitPower},
{"UnitManaMax", lua_UnitPowerMax},
{"UnitRage", lua_UnitPower},
{"UnitEnergy", lua_UnitPower},
{"UnitFocus", lua_UnitPower},
{"UnitRunicPower", lua_UnitPower},
{"UnitLevel", lua_UnitLevel},
{"UnitExists", lua_UnitExists},
{"UnitIsDead", lua_UnitIsDead},