[Commands] Consolidate #show commands into a singular #show command (#3478)

* [Cleanup] Consolidate #show commands into a singular #show command

# Notes
- All `#show` commands like `#showbuffs` are now subcommands of `#show`.
- All aliases like `#showbuffs` still function.

* Push up progress.

* Final push.

* Cleanup.

* Update ip_lookup.cpp

* emotes not emote

* Cleanup

* Update servertalk.h

* Update show.cpp

* Fix

* Final push.

* #aggro

* #who
This commit is contained in:
Alex King
2023-07-08 11:06:25 -04:00
committed by GitHub
parent d4962bb2ab
commit e55fb1cafd
90 changed files with 2767 additions and 2591 deletions
+19 -22
View File
@@ -1023,8 +1023,8 @@ void Client::SendZoneFlagInfo(Client *to) const {
to->Message(
Chat::White,
fmt::format(
"{} {} no Zone Flags.",
to == this ? "You" : GetName(),
"{} {} no zone flags.",
to->GetTargetDescription(const_cast<Mob*>(CastToMob()), TargetDescriptionType::UCYou),
to == this ? "have" : "has"
).c_str()
);
@@ -1034,32 +1034,29 @@ void Client::SendZoneFlagInfo(Client *to) const {
to->Message(
Chat::White,
fmt::format(
"{} {} the following Zone Flags:",
to == this ? "You" : GetName(),
"{} {} the following zone flags:",
to->GetTargetDescription(const_cast<Mob*>(CastToMob()), TargetDescriptionType::UCYou),
to == this ? "have" : "has"
).c_str()
);
int flag_count = 0;
for (const auto& zone_id : zone_flags) {
int flag_number = (flag_count + 1);
const char* zone_short_name = ZoneName(zone_id, true);
if (strncmp(zone_short_name, "UNKNOWN", strlen(zone_short_name)) != 0) {
std::string zone_long_name = ZoneLongName(zone_id);
std::string flag_name = "ERROR";
uint32 flag_count = 0;
auto z = GetZone(zone_id);
if (z) {
flag_name = z->flag_needed;
}
for (const auto& zone_id : zone_flags) {
const uint32 flag_number = (flag_count + 1);
const auto& z = GetZone(zone_id);
if (z) {
const std::string& flag_name = z->flag_needed;
to->Message(
Chat::White,
fmt::format(
"Flag {} | Zone: {} ({}) ID: {}",
"Flag {} | Zone: {} ({}) ID: {}{}",
flag_number,
zone_long_name,
zone_short_name,
z->long_name,
z->short_name,
zone_id,
(
!flag_name.empty() ?
@@ -1078,10 +1075,10 @@ void Client::SendZoneFlagInfo(Client *to) const {
to->Message(
Chat::White,
fmt::format(
"{} {} {} Zone Flags.",
to == this ? "You" : GetName(),
to == this ? "have" : "has",
flag_count
"{} Zone flag{} found for {}.",
flag_count,
flag_count != 1 ? "s" : "",
to->GetTargetDescription(const_cast<Mob*>(CastToMob()))
).c_str()
);
}