mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 12:28:26 +00:00
[Quest API] Add SendGMCommand() to Perl/Lua. (#2527)
* [Quest API] Add SendGMCommand() to Perl/Lua. # Perl - Add `$client->SendGMCommand(message)` to Perl. - Add `$client->SendGMCommand(message, ignore_status)` to Perl. # Lua - Add `client:SendGMCommand(message)` to Lua. - Add `client:SendGMCommand(message, ignore_status)` to Lua. # Notes - `ignore_status` allows you to have players use GM commands that they are not the required status level for through the Quest API. - `ignore_status` is default false, so if you don't send it, it checks and makes sure the player can use the command you're sending before allowing it. * Typo. * Formatting.
This commit is contained in:
@@ -2593,6 +2593,16 @@ bool Lua_Client::HasRecipeLearned(uint32 recipe_id) {
|
||||
return self->HasRecipeLearned(recipe_id);
|
||||
}
|
||||
|
||||
bool Lua_Client::SendGMCommand(std::string message) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->SendGMCommand(message);
|
||||
}
|
||||
|
||||
bool Lua_Client::SendGMCommand(std::string message, bool ignore_status) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->SendGMCommand(message, ignore_status);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_client() {
|
||||
return luabind::class_<Lua_Client, Lua_Mob>("Client")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -2913,6 +2923,8 @@ luabind::scope lua_register_client() {
|
||||
.def("ScribeSpells", (uint16(Lua_Client::*)(uint8,uint8))&Lua_Client::ScribeSpells)
|
||||
.def("SendColoredText", (void(Lua_Client::*)(uint32, std::string))&Lua_Client::SendColoredText)
|
||||
.def("SendItemScale", (void(Lua_Client::*)(Lua_ItemInst))&Lua_Client::SendItemScale)
|
||||
.def("SendGMCommand", (bool(Lua_Client::*)(std::string))&Lua_Client::SendGMCommand)
|
||||
.def("SendGMCommand", (bool(Lua_Client::*)(std::string,bool))&Lua_Client::SendGMCommand)
|
||||
.def("SendMarqueeMessage", (void(Lua_Client::*)(uint32, uint32, uint32, uint32, uint32, std::string))&Lua_Client::SendMarqueeMessage)
|
||||
.def("SendOPTranslocateConfirm", (void(Lua_Client::*)(Lua_Mob,int))&Lua_Client::SendOPTranslocateConfirm)
|
||||
.def("SendPEQZoneFlagInfo", (void(Lua_Client::*)(Lua_Client))&Lua_Client::SendPEQZoneFlagInfo)
|
||||
|
||||
Reference in New Issue
Block a user