Kinglykrab e87b8e2682
[Commands] Cleanup #gender Command. (#1832)
- Cleanup message and logic.
- Cleanup other spots using similar logic so they're all uniform.
2021-11-26 10:01:35 -05:00

33 lines
548 B
C++
Executable File

#include "../client.h"
void command_loc(Client *c, const Seperator *sep)
{
Mob *target = c;
if (c->GetTarget()) {
target = c->GetTarget();
}
auto target_position = target->GetPosition();
c->Message(
Chat::White,
fmt::format(
"Location for {} | XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f}",
(
c == target ?
"Yourself" :
fmt::format(
"{} ({})",
target->GetCleanName(),
target->GetID()
)
),
target_position.x,
target_position.y,
target_position.z,
target_position.w
).c_str()
);
}