mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 20:56:37 +00:00
[Commands] Cleanup #undye and #undyeme Commands. (#1966)
- Fix #undye command as its method was not being used in command.cpp. - Cleanup messages and logic for both #undye and #undyeme.
This commit is contained in:
@@ -2,11 +2,23 @@
|
||||
|
||||
void command_undye(Client *c, const Seperator *sep)
|
||||
{
|
||||
auto target = c;
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
c->GetTarget()->CastToClient()->Undye();
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "ERROR: Client target required");
|
||||
}
|
||||
}
|
||||
|
||||
target->Undye();
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Undyed armor for {}.",
|
||||
c == target ?
|
||||
"yourself" :
|
||||
fmt::format(
|
||||
"{} ({})",
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user