mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* [Commands] Cleanup #reloadzps Command. - Cleanup messages and logic. - Make reloading of zone points global instead of zone specific. * Further cleanup. - Add zone->GetZoneDescription(). - Add mob->GetTargetDescription(mob). * Final cleanup. * Typo.
40 lines
774 B
C++
Executable File
40 lines
774 B
C++
Executable File
#include "../client.h"
|
|
|
|
void command_gmspeed(Client *c, const Seperator *sep)
|
|
{
|
|
int arguments = sep->argnum;
|
|
if (!arguments) {
|
|
c->Message(Chat::White, "Usage: #gmspeed [On|Off]");
|
|
return;
|
|
}
|
|
|
|
bool gm_speed_flag = atobool(sep->arg[1]);
|
|
Client *target = c;
|
|
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
|
target = c->GetTarget()->CastToClient();
|
|
}
|
|
|
|
database.SetGMSpeed(
|
|
target->AccountID(),
|
|
gm_speed_flag ? 1 : 0
|
|
);
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Turning GM Speed {} for {}.",
|
|
gm_speed_flag ? "on" : "off",
|
|
c->GetTargetDescription(target)
|
|
).c_str()
|
|
);
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Note: {} must zone for it to take effect.",
|
|
c->GetTargetDescription(target, TargetDescriptionType::UCYou)
|
|
).c_str()
|
|
);
|
|
}
|
|
|