From a70f42d4f69a36aa79ec1ca9809750477b2e9daf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 22 Mar 2026 19:37:58 -0700 Subject: [PATCH] feat: add UnitRage, UnitEnergy, UnitFocus, UnitRunicPower aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/addons/lua_engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index 5871010d..5611c0eb 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -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},