mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
35 lines
861 B
C++
Executable File
35 lines
861 B
C++
Executable File
#include "../client.h"
|
|
|
|
void command_resetaa(Client *c, const Seperator *sep)
|
|
{
|
|
Client* t = c;
|
|
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
|
t = c->GetTarget()->CastToClient();
|
|
}
|
|
|
|
const uint16 arguments = sep->argnum;
|
|
const bool is_aa = !strcasecmp(sep->arg[1], "aa");
|
|
const bool is_leadership = !strcasecmp(sep->arg[1], "leadership");
|
|
|
|
if (!arguments || (!is_aa && !is_leadership)) {
|
|
c->Message(Chat::White, "Usage: #resetaa aa - Resets and refunds a player's AAs");
|
|
c->Message(Chat::White, "Usage: #resetaa leadership - Resets a player's Leadership AAs");
|
|
return;
|
|
}
|
|
|
|
if (is_aa) {
|
|
t->ResetAA();
|
|
} else if (is_leadership) {
|
|
t->ResetLeadershipAA();
|
|
}
|
|
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Successfully reset all{} AAs for {}.",
|
|
is_aa ? "" : " Leadership",
|
|
c->GetTargetDescription(t)
|
|
).c_str()
|
|
);
|
|
}
|