Chris Miles 0550fcfd3f
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files

* Code cleanup
2021-11-14 22:48:47 -06:00

33 lines
546 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 | XYZ: {:.2f}, {:.2f}, {:.2f} Heading: {:.2f}",
(
c == target ?
"Your" :
fmt::format(
"{} ({})",
target->GetCleanName(),
target->GetID()
)
),
target_position.x,
target_position.y,
target_position.z,
target_position.w
).c_str()
);
}