mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +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:
parent
1ea8888607
commit
d83ced6f76
@ -378,6 +378,7 @@ int command_init(void)
|
||||
command_add("trapinfo", "- Gets infomation about the traps currently spawned in the zone.", AccountStatus::QuestTroupe, command_trapinfo) ||
|
||||
command_add("tune", "Calculate statistical values related to combat.", AccountStatus::GMAdmin, command_tune) ||
|
||||
command_add("ucs", "- Attempts to reconnect to the UCS server", AccountStatus::Player, command_ucs) ||
|
||||
command_add("undye", "- Remove dye from all of your or your target's armor slots", AccountStatus::GMAdmin, command_undye) ||
|
||||
command_add("undyeme", "- Remove dye from all of your armor slots", AccountStatus::Player, command_undyeme) ||
|
||||
command_add("unfreeze", "- Unfreeze your target", AccountStatus::QuestTroupe, command_unfreeze) ||
|
||||
command_add("unlock", "- Unlock the worldserver", AccountStatus::GMLeadAdmin, command_unlock) ||
|
||||
|
||||
@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,9 +2,6 @@
|
||||
|
||||
void command_undyeme(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c) {
|
||||
c->Undye();
|
||||
c->Message(Chat::Red, "Dye removed from all slots. Please zone for the process to complete.");
|
||||
}
|
||||
c->Undye();
|
||||
c->Message(Chat::White, "Undyed armor for yourself.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user