[Commands] Cleanup #makepet Command. (#2105)

- Cleanup messages and logic.
This commit is contained in:
Kinglykrab
2022-05-06 20:58:07 -04:00
committed by GitHub
parent a847e461c1
commit e62a283a79
2 changed files with 12 additions and 5 deletions
+11 -4
View File
@@ -2,11 +2,18 @@
void command_makepet(Client *c, const Seperator *sep)
{
if (sep->arg[1][0] == '\0') {
c->Message(Chat::White, "Usage: #makepet pet_type_name (will not survive across zones)");
int arguments = sep->argnum;
if (!arguments) {
c->Message(Chat::White, "Usage: #makepet [Pet Name]");
return;
}
else {
c->MakePet(0, sep->arg[1]);
std::string pet_name = sep->arg[1];
if (pet_name.empty()) {
c->Message(Chat::White, "Usage: #makepet [Pet Name]");
return;
}
c->MakePet(0, pet_name.c_str());
}