From 6beb220e938d92649a9016852bfdd6fab7bc4acf Mon Sep 17 00:00:00 2001 From: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> Date: Fri, 6 May 2022 20:20:42 -0400 Subject: [PATCH] [Commands] Cleanup #reloadtitles Command. (#2125) * [Commands] Cleanup #reloadtitles Command. - Cleanup messages; * Update worldserver.cpp --- zone/gm_commands/reloadtitles.cpp | 3 +-- zone/worldserver.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/zone/gm_commands/reloadtitles.cpp b/zone/gm_commands/reloadtitles.cpp index f9143b966..93af6a95f 100755 --- a/zone/gm_commands/reloadtitles.cpp +++ b/zone/gm_commands/reloadtitles.cpp @@ -5,10 +5,9 @@ extern WorldServer worldserver; void command_reloadtitles(Client *c, const Seperator *sep) { + c->Message(Chat::White, "Attempting to reload titles globally."); auto pack = new ServerPacket(ServerOP_ReloadTitles, 0); worldserver.SendPacket(pack); safe_delete(pack); - c->Message(Chat::Yellow, "Player Titles Reloaded."); - } diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 25abd8ab7..d3f0b9f41 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -1721,6 +1721,31 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) case ServerOP_ReloadTitles: { + if (zone) { + worldserver.SendEmoteMessage( + 0, + 0, + AccountStatus::GMAdmin, + Chat::Yellow, + fmt::format( + "Titles reloaded for {}{}.", + fmt::format( + "{} ({})", + zone->GetLongName(), + zone->GetZoneID() + ), + ( + zone->GetInstanceID() ? + fmt::format( + " (Instance ID {})", + zone->GetInstanceID() + ) : + "" + ) + ).c_str() + ); + } + title_manager.LoadTitles(); break; }