[Bug Fix] Fix #goto Target (#4382)

This commit is contained in:
Alex King 2024-06-03 03:02:27 -04:00 committed by GitHub
parent 9614ea59ec
commit 1e57a0372f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ void command_goto(Client *c, const Seperator *sep)
{
const uint16 arguments = sep->argnum;
const bool goto_player = !sep->IsNumber(1) && sep->arg[1];
const bool goto_player = arguments > 0 && !sep->IsNumber(1);
const bool goto_position = sep->IsNumber(1) && sep->IsNumber(2) && sep->IsNumber(3);
const bool goto_target = !arguments && c->GetTarget();
@ -78,6 +78,14 @@ void command_goto(Client *c, const Seperator *sep)
t->GetZ(),
t->GetHeading()
);
c->Message(
Chat::White,
fmt::format(
"Going to {} in the same zone.",
c->GetTargetDescription(t)
).c_str()
);
}
}