mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 05:16:37 +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
+42
@@ -0,0 +1,42 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_fov(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c->GetTarget()) {
|
||||
auto target = c->GetTarget();
|
||||
std::string behind_message = (
|
||||
c->BehindMob(
|
||||
target,
|
||||
c->GetX(),
|
||||
c->GetY()
|
||||
) ?
|
||||
"behind" :
|
||||
"not behind"
|
||||
);
|
||||
std::string gender_message = (
|
||||
target->GetGender() == MALE ?
|
||||
"he" :
|
||||
(
|
||||
target->GetGender() == FEMALE ?
|
||||
"she" :
|
||||
"it"
|
||||
)
|
||||
);
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"You are {} {} ({}), {} has a heading of {}.",
|
||||
behind_message,
|
||||
target->GetCleanName(),
|
||||
target->GetID(),
|
||||
gender_message,
|
||||
target->GetHeading()
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "You must have a target to use this command.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user