[Commands] Cleanup #showspellslist Command. (#1703)

- Cleanup messages and display.
This commit is contained in:
Kinglykrab
2021-11-09 21:24:34 -05:00
committed by GitHub
parent a64e326c68
commit e306059f43
2 changed files with 84 additions and 14 deletions
+2 -10
View File
@@ -13991,19 +13991,11 @@ void command_object(Client *c, const Seperator *sep)
void command_showspellslist(Client *c, const Seperator *sep)
{
Mob *target = c->GetTarget();
if (!target) {
c->Message(Chat::White, "Must target an NPC.");
if (!target || !target->IsNPC()) {
c->Message(Chat::White, "You must target an NPC to use this command.");
return;
}
if (!target->IsNPC()) {
c->Message(Chat::White, "%s is not an NPC.", target->GetName());
return;
}
target->CastToNPC()->AISpellsList(c);
return;
}