From cf1f8d5460522767e82dc5a37eb9cf457db9bc0c Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sun, 26 Nov 2023 14:50:44 -0500 Subject: [PATCH] [Commands] #petname changes PC to Nobody if selected. (#3720) --- zone/gm_commands/petname.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/gm_commands/petname.cpp b/zone/gm_commands/petname.cpp index 47eea80c3..7320a1816 100755 --- a/zone/gm_commands/petname.cpp +++ b/zone/gm_commands/petname.cpp @@ -5,10 +5,10 @@ void command_petname(Client *c, const Seperator *sep) Mob *target; target = c->GetTarget(); - if (!target) { - c->Message(Chat::White, "Usage: #petname newname (requires a target)"); + if (!target || !target->IsPet()) { + c->Message(Chat::White, "Usage: #petname newname (requires a pet target)"); } - else if (target->IsPet() && (target->GetOwnerID() == c->GetID()) && strlen(sep->arg[1]) > 0) { + else if (target->GetOwnerID() == c->GetID() && strlen(sep->arg[1]) > 0) { char *oldname = strdup(target->GetName()); target->TempName(sep->arg[1]); c->Message(Chat::White, "Renamed %s to %s", oldname, sep->arg[1]);