mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 16:30:15 +00:00
feat: add Logout, CancelLogout, RandomRoll, FollowUnit
Logout() sends logout request to server. CancelLogout() cancels a pending logout. RandomRoll(min, max) sends /roll (defaults 1-100). FollowUnit() is a stub (requires movement system). Backed by existing requestLogout, cancelLogout, randomRoll methods.
This commit is contained in:
parent
6c873622dc
commit
2b582f8a20
1 changed files with 22 additions and 0 deletions
|
|
@ -5182,6 +5182,28 @@ void LuaEngine::registerCoreAPI() {
|
|||
if (gh) gh->requestPvpLog();
|
||||
return 0;
|
||||
}},
|
||||
// --- System Commands ---
|
||||
{"Logout", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->requestLogout();
|
||||
return 0;
|
||||
}},
|
||||
{"CancelLogout", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
if (gh) gh->cancelLogout();
|
||||
return 0;
|
||||
}},
|
||||
{"RandomRoll", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
int mn = static_cast<int>(luaL_optnumber(L, 1, 1));
|
||||
int mx = static_cast<int>(luaL_optnumber(L, 2, 100));
|
||||
if (gh) gh->randomRoll(mn, mx);
|
||||
return 0;
|
||||
}},
|
||||
{"FollowUnit", [](lua_State* L) -> int {
|
||||
(void)L; // Follow requires movement system integration
|
||||
return 0;
|
||||
}},
|
||||
// --- Party/Group Management ---
|
||||
{"InviteUnit", [](lua_State* L) -> int {
|
||||
auto* gh = getGameHandler(L);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue