mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
[Commands] #petname changes PC to Nobody if selected. (#3720)
This commit is contained in:
parent
690cacdaab
commit
cf1f8d5460
@ -5,10 +5,10 @@ void command_petname(Client *c, const Seperator *sep)
|
|||||||
Mob *target;
|
Mob *target;
|
||||||
target = c->GetTarget();
|
target = c->GetTarget();
|
||||||
|
|
||||||
if (!target) {
|
if (!target || !target->IsPet()) {
|
||||||
c->Message(Chat::White, "Usage: #petname newname (requires a target)");
|
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());
|
char *oldname = strdup(target->GetName());
|
||||||
target->TempName(sep->arg[1]);
|
target->TempName(sep->arg[1]);
|
||||||
c->Message(Chat::White, "Renamed %s to %s", oldname, sep->arg[1]);
|
c->Message(Chat::White, "Renamed %s to %s", oldname, sep->arg[1]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user