mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 16:23:52 +00:00
feat: add guild management (invite, kick, promote, demote, leave, notes)
GuildInvite(name) invites a player to the guild. GuildUninvite(name) kicks a member (uses kickGuildMember). GuildPromote(name) / GuildDemote(name) change rank. GuildLeave() leaves the guild. GuildSetPublicNote(name, note) sets a member's public note. All backed by existing GameHandler methods that send the appropriate guild management CMSG packets.
This commit is contained in:
parent
2f68282afc
commit
7927d98e79
1 changed files with 31 additions and 0 deletions
|
|
@ -5182,6 +5182,37 @@ void LuaEngine::registerCoreAPI() {
|
||||||
if (gh) gh->requestPvpLog();
|
if (gh) gh->requestPvpLog();
|
||||||
return 0;
|
return 0;
|
||||||
}},
|
}},
|
||||||
|
// --- Guild Management ---
|
||||||
|
{"GuildInvite", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->inviteToGuild(luaL_checkstring(L, 1));
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
|
{"GuildUninvite", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->kickGuildMember(luaL_checkstring(L, 1));
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
|
{"GuildPromote", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->promoteGuildMember(luaL_checkstring(L, 1));
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
|
{"GuildDemote", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->demoteGuildMember(luaL_checkstring(L, 1));
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
|
{"GuildLeave", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->leaveGuild();
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
|
{"GuildSetPublicNote", [](lua_State* L) -> int {
|
||||||
|
auto* gh = getGameHandler(L);
|
||||||
|
if (gh) gh->setGuildPublicNote(luaL_checkstring(L, 1), luaL_checkstring(L, 2));
|
||||||
|
return 0;
|
||||||
|
}},
|
||||||
// --- Emotes ---
|
// --- Emotes ---
|
||||||
{"DoEmote", [](lua_State* L) -> int {
|
{"DoEmote", [](lua_State* L) -> int {
|
||||||
auto* gh = getGameHandler(L);
|
auto* gh = getGameHandler(L);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue