From 0dc3e52d323bd4401f5d46b19d5ad9b7254710bf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 23 Mar 2026 02:38:18 -0700 Subject: [PATCH] feat: add inspect and clear stubs for inspection addons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GetInspectSpecialization() returns the inspected player's active talent group from the cached InspectResult data. NotifyInspect() and ClearInspectPlayer() are stubs — inspection is auto-triggered by the C++ side when targeting players. These prevent nil errors in inspection addons that call them. --- src/addons/lua_engine.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/addons/lua_engine.cpp b/src/addons/lua_engine.cpp index 42a8176d..ac971cad 100644 --- a/src/addons/lua_engine.cpp +++ b/src/addons/lua_engine.cpp @@ -5182,6 +5182,21 @@ void LuaEngine::registerCoreAPI() { if (gh) gh->requestPvpLog(); return 0; }}, + // --- Inspect --- + {"GetInspectSpecialization", [](lua_State* L) -> int { + auto* gh = getGameHandler(L); + const auto* ir = gh ? gh->getInspectResult() : nullptr; + lua_pushnumber(L, ir ? ir->activeTalentGroup : 0); + return 1; + }}, + {"NotifyInspect", [](lua_State* L) -> int { + (void)L; // Inspect is auto-triggered by the C++ side when targeting a player + return 0; + }}, + {"ClearInspectPlayer", [](lua_State* L) -> int { + (void)L; + return 0; + }}, // --- Player Info --- {"GetHonorCurrency", [](lua_State* L) -> int { auto* gh = getGameHandler(L);