eqemu-server/zone/gm_commands/randomfeatures.cpp
Kinglykrab 6e15fae6a0
[Commands] Cleanup #randomizefeatures Command. (#2118)
- Cleanup messages and logic.
- Make #randomizefeatures function for Iksar and Vah Shir.
2022-05-06 20:42:34 -04:00

35 lines
679 B
C++
Executable File

#include "../client.h"
void command_randomfeatures(Client *c, const Seperator *sep)
{
if (!c->GetTarget()) {
c->Message(Chat::White, "You must have a target to use this command.");
return;
}
auto target = c->GetTarget();
if (target->RandomizeFeatures()) {
c->Message(
Chat::White,
fmt::format(
"{} ({}) has had their features randomized.",
target->GetCleanName(),
target->GetID()
).c_str()
);
} else {
c->Message(
Chat::White,
fmt::format(
"{} ({}) is not a player race, their race is {} ({}).",
target->GetCleanName(),
target->GetID(),
GetRaceIDName(target->GetRace()),
target->GetRace()
).c_str()
);
}
}