mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Commands] Cleanup #resetaa Command. (#2132)
* [Commands] Cleanup #resetaa Command. - Cleanup messages and logic. * Update resetaa.cpp
This commit is contained in:
parent
132c936c90
commit
adfec15893
@ -2,12 +2,28 @@
|
|||||||
|
|
||||||
void command_resetaa(Client *c, const Seperator *sep)
|
void command_resetaa(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
if (!c->GetTarget() || !c->GetTarget()->IsClient()) {
|
||||||
c->GetTarget()->CastToClient()->ResetAA();
|
c->Message(Chat::White, "You must target a player to use this command.");
|
||||||
c->Message(Chat::Red, "Successfully reset %s's AAs", c->GetTarget()->GetName());
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
c->Message(Chat::White, "Usage: Target a client and use #resetaa to reset the AA data in their Profile.");
|
auto target = c->GetTarget()->CastToClient();
|
||||||
}
|
target->ResetAA();
|
||||||
|
|
||||||
|
c->Message(
|
||||||
|
Chat::White,
|
||||||
|
fmt::format(
|
||||||
|
"Successfully reset all Alternate Advancements for {}.",
|
||||||
|
(
|
||||||
|
c == target ?
|
||||||
|
"yourself" :
|
||||||
|
fmt::format(
|
||||||
|
"{} ({})",
|
||||||
|
target->GetCleanName(),
|
||||||
|
target->GetID()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user