mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 01:01:30 +00:00
[Commands] Cleanup #reloadperlexportsettings Command. (#2124)
* [Commands] Cleanup #reloadperlexportsettings Command. - Cleanup messages and logic. - Make reloading of Perl event export settings global instead of zone specific. * Update worldserver.cpp
This commit is contained in:
parent
6beb220e93
commit
1d59fff2bf
@ -293,7 +293,7 @@ int command_init(void)
|
||||
command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) ||
|
||||
command_add("reloadlevelmods", nullptr, AccountStatus::Max, command_reloadlevelmods) ||
|
||||
command_add("reloadmerchants", nullptr, AccountStatus::Max, command_reloadmerchants) ||
|
||||
command_add("reloadperlexportsettings", nullptr, AccountStatus::Max, command_reloadperlexportsettings) ||
|
||||
command_add("reloadperlexportsettings", "Reloads Perl event export settings globally", AccountStatus::Max, command_reloadperlexportsettings) ||
|
||||
command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", AccountStatus::GMLeadAdmin, command_reloadqst) ||
|
||||
command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", AccountStatus::QuestTroupe, command_reloadworldrules) ||
|
||||
command_add("reloadstatic", "- Reload Static Zone Data globally", AccountStatus::GMLeadAdmin, command_reloadstatic) ||
|
||||
|
||||
@ -5,12 +5,9 @@ extern WorldServer worldserver;
|
||||
|
||||
void command_reloadperlexportsettings(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (c) {
|
||||
auto pack = new ServerPacket(ServerOP_ReloadPerlExportSettings, 0);
|
||||
worldserver.SendPacket(pack);
|
||||
c->Message(Chat::Red, "Successfully sent the packet to world to reload Perl Export settings");
|
||||
safe_delete(pack);
|
||||
|
||||
}
|
||||
c->Message(Chat::White, "Attempting to reload Perl event export settings globally.");
|
||||
auto pack = new ServerPacket(ServerOP_ReloadPerlExportSettings, 0);
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
|
||||
@ -2046,6 +2046,30 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_ReloadPerlExportSettings: {
|
||||
if (zone) {
|
||||
worldserver.SendEmoteMessage(
|
||||
0,
|
||||
0,
|
||||
AccountStatus::GMAdmin,
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Perl event export settings reloaded for {}{}.",
|
||||
fmt::format(
|
||||
"{} ({})",
|
||||
zone->GetLongName(),
|
||||
zone->GetZoneID()
|
||||
),
|
||||
(
|
||||
zone->GetInstanceID() ?
|
||||
fmt::format(
|
||||
" (Instance ID {})",
|
||||
zone->GetInstanceID()
|
||||
) :
|
||||
""
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user