[Commands] Cleanup #reloadtraps Command. (#2126)

* [Commands] Cleanup #reloadtraps Command.
- Cleanup messages and logic.
- Allow the option to reload/repop traps globally for this command.

* Typos.
This commit is contained in:
Kinglykrab
2022-05-06 22:39:21 -04:00
committed by GitHub
parent 7549fbbeea
commit 0b3065d7a9
4 changed files with 93 additions and 4 deletions
+32 -1
View File
@@ -2073,7 +2073,38 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
break;
}
case ServerOP_ReloadLevelEXPMods: {
case ServerOP_ReloadTraps:
{
if (zone) {
worldserver.SendEmoteMessage(
0,
0,
AccountStatus::GMAdmin,
Chat::Yellow,
fmt::format(
"Traps reloaded for {}{}.",
fmt::format(
"{} ({})",
zone->GetLongName(),
zone->GetZoneID()
),
(
zone->GetInstanceID() ?
fmt::format(
" (Instance ID {})",
zone->GetInstanceID()
) :
""
)
).c_str()
);
entity_list.UpdateAllTraps(true, true);
}
break;
}
case ServerOP_ReloadLevelEXPMods:
{
if (zone) {
worldserver.SendEmoteMessage(
0,