mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-27 01:00:13 +00:00
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:
parent
4f28187661
commit
0dc3e52d32
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue