mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 12:36:36 +00:00
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files * Code cleanup
This commit is contained in:
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#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()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user