[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
+9 -9
View File
@@ -360,17 +360,17 @@ void EntityList::UpdateAllTraps(bool respawn, bool repopnow)
Log(Logs::General, Logs::Traps, "All traps updated.");
}
void EntityList::GetTrapInfo(Client* client)
void EntityList::GetTrapInfo(Client* c)
{
uint32 trap_count = 0;
uint32 trap_count = 0;
uint32 trap_number = 1;
for (const auto& trap : trap_list) {
auto t = trap.second;
if (t->IsTrap()) {
bool is_set = (t->chkarea_timer.Enabled() && !t->reset_timer.Enabled());
const bool is_set = (t->chkarea_timer.Enabled() && !t->reset_timer.Enabled());
client->Message(
c->Message(
Chat::White,
fmt::format(
"Trap {} | ID: {} Active: {} Coordinates: {:.2f}, {:.2f}, {:.2f}",
@@ -383,7 +383,7 @@ void EntityList::GetTrapInfo(Client* client)
).c_str()
);
client->Message(
c->Message(
Chat::White,
fmt::format(
"Trap {} | Times Triggered: {} Group: {}",
@@ -394,7 +394,7 @@ void EntityList::GetTrapInfo(Client* client)
);
if (!t->message.empty()) {
client->Message(
c->Message(
Chat::White,
fmt::format(
"Trap {} | Message: {}",
@@ -410,14 +410,14 @@ void EntityList::GetTrapInfo(Client* client)
}
if (!trap_count) {
client->Message(Chat::White, "No traps were found in this zone.");
c->Message(Chat::White, "No traps were found.");
return;
}
client->Message(
c->Message(
Chat::White,
fmt::format(
"{} trap{} found.",
"{} Trap{} found.",
trap_count,
trap_count != 1 ? "s" : ""
).c_str()