mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 00:06:36 +00:00
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files * Code cleanup
This commit is contained in:
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_race(Client *c, const Seperator *sep)
|
||||
{
|
||||
Mob *target = c->CastToMob();
|
||||
|
||||
if (sep->IsNumber(1)) {
|
||||
auto race = atoi(sep->arg[1]);
|
||||
if ((race >= 0 && race <= RuleI(NPC, MaxRaceID)) || (race >= 2253 && race <= 2259)) {
|
||||
if ((c->GetTarget()) && c->Admin() >= commandRaceOthers) {
|
||||
target = c->GetTarget();
|
||||
}
|
||||
target->SendIllusionPacket(race);
|
||||
}
|
||||
else {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Usage: #race [0-{}, 2253-2259] (0 for back to normal)",
|
||||
RuleI(NPC, MaxRaceID)).c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format("Usage: #race [0-{}, 2253-2259] (0 for back to normal)", RuleI(NPC, MaxRaceID)).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user