mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-29 06:12:17 +00:00
[Commands] Extend #devtools Functionality (#4425)
This commit is contained in:
1 parent
b6fb8daae8
commit
098498dedd
3 files changed
+30
-8
No files matched your search
@@ -3,11 +3,19 @@
|
||||
|
||||
void command_devtools(Client *c, const Seperator *sep)
|
||||
{
|
||||
bool is_disable = !strcasecmp(sep->arg[1], "disable");
|
||||
bool is_enable = !strcasecmp(sep->arg[1], "enable");
|
||||
const uint16 arguments = sep->argnum;
|
||||
if (arguments != 2) {
|
||||
c->ShowDevToolsMenu();
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_disable || is_enable) {
|
||||
c->SetDevToolsEnabled(is_enable);
|
||||
const std::string& type = sep->arg[1];
|
||||
const bool toggle = Strings::ToBool(sep->arg[2]);
|
||||
|
||||
if (Strings::EqualFold(type, "menu")) {
|
||||
c->SetDevToolsEnabled(toggle);
|
||||
} else if (Strings::EqualFold(type, "window")) {
|
||||
c->SetDisplayMobInfoWindow(toggle);
|
||||
}
|
||||
|
||||
c->ShowDevToolsMenu();
|
||||
|
||||
Reference in new issue
Block a user