feat: add inspect and clear stubs for inspection addons

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.
This commit is contained in:
Kelsi 2026-03-23 02:38:18 -07:00
parent 4f28187661
commit 0dc3e52d32

View file

@ -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);