mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
feat: add player commands (helm/cloak toggle, PvP, minimap ping, /played)
ShowHelm() / ShowCloak() toggle helm/cloak visibility. TogglePVP() toggles PvP flag. Minimap_Ping(x, y) sends a minimap ping to the group. RequestTimePlayed() requests /played data from server. All backed by existing GameHandler methods.
This commit is contained in:
parent
9a47def27c
commit
c874ffc6b6
1 changed files with 28 additions and 0 deletions
|
|
@ -5182,6 +5182,34 @@ void LuaEngine::registerCoreAPI() {
|
|||
if (gh) gh->requestPvpLog();
|
||||
return 0;
|
||||
}},
|
||||
// --- Player Commands ---
|
||||
{"ShowHelm", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->toggleHelm(); // Toggles helm visibility
|
||||
return 0;
|
||||
}},
|
||||
{"ShowCloak", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->toggleCloak();
|
||||
return 0;
|
||||
}},
|
||||
{"TogglePVP", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->togglePvp();
|
||||
return 0;
|
||||
}},
|
||||
{"Minimap_Ping", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
float x = static_cast<float>(luaL_optnumber(L, 1, 0));
|
||||
float y = static_cast<float>(luaL_optnumber(L, 2, 0));
|
||||
if (gh) gh->sendMinimapPing(x, y);
|
||||
return 0;
|
||||
}},
|
||||
{"RequestTimePlayed", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->requestPlayedTime();
|
||||
return 0;
|
||||
}},
|
||||
// --- Chat Channels ---
|
||||
{"JoinChannelByName", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue