mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
[Commands] Cleanup #reloadlevelmods Command. (#2122)
* [Commands] Cleanup #reloadlevelmods Command. - Cleanup messages and logic. - Make the reloading of modifiers global instead of zone-specific. * Remove unnecessary message. * Update worldserver.cpp * Update worldserver.cpp * Update worldserver.cpp
This commit is contained in:
parent
e26eba8e03
commit
7549fbbeea
@ -228,6 +228,7 @@
|
|||||||
#define ServerOP_UpdateSchedulerEvents 0x4012
|
#define ServerOP_UpdateSchedulerEvents 0x4012
|
||||||
#define ServerOP_ReloadContentFlags 0x4013
|
#define ServerOP_ReloadContentFlags 0x4013
|
||||||
#define ServerOP_ReloadVariablesWorld 0x4014
|
#define ServerOP_ReloadVariablesWorld 0x4014
|
||||||
|
#define ServerOP_ReloadLevelEXPMods 0x4015
|
||||||
#define ServerOP_ReloadMerchants 0x4016
|
#define ServerOP_ReloadMerchants 0x4016
|
||||||
#define ServerOP_ReloadAAData 0x4017
|
#define ServerOP_ReloadAAData 0x4017
|
||||||
#define ServerOP_ReloadStaticZoneData 0x4020
|
#define ServerOP_ReloadStaticZoneData 0x4020
|
||||||
|
|||||||
@ -889,6 +889,11 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
|||||||
zoneserver_list.SendPacket(pack);
|
zoneserver_list.SendPacket(pack);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ServerOP_ReloadLevelEXPMods:
|
||||||
|
{
|
||||||
|
zoneserver_list.SendPacket(pack);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ServerOP_ReloadAAData:
|
case ServerOP_ReloadAAData:
|
||||||
{
|
{
|
||||||
zoneserver_list.SendPacket(pack);
|
zoneserver_list.SendPacket(pack);
|
||||||
|
|||||||
@ -287,7 +287,7 @@ int command_init(void)
|
|||||||
command_add("reloadallrules", "Executes a reload of all rules globally.", AccountStatus::QuestTroupe, command_reloadallrules) ||
|
command_add("reloadallrules", "Executes a reload of all rules globally.", AccountStatus::QuestTroupe, command_reloadallrules) ||
|
||||||
command_add("reloadcontentflags", "Executes a reload of all expansion and content flags", AccountStatus::QuestTroupe, command_reloadcontentflags) ||
|
command_add("reloadcontentflags", "Executes a reload of all expansion and content flags", AccountStatus::QuestTroupe, command_reloadcontentflags) ||
|
||||||
command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) ||
|
command_add("reloademote", "Reloads NPC Emotes", AccountStatus::QuestTroupe, command_reloademote) ||
|
||||||
command_add("reloadlevelmods", nullptr, AccountStatus::Max, command_reloadlevelmods) ||
|
command_add("reloadlevelmods", "Reloads level based experience modifiers globally", AccountStatus::Max, command_reloadlevelmods) ||
|
||||||
command_add("reloadmerchants", "Reloads merchant lists globally", AccountStatus::Max, command_reloadmerchants) ||
|
command_add("reloadmerchants", "Reloads merchant lists globally", AccountStatus::Max, command_reloadmerchants) ||
|
||||||
command_add("reloadperlexportsettings", "Reloads Perl event export settings globally", 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("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", AccountStatus::GMLeadAdmin, command_reloadqst) ||
|
||||||
|
|||||||
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
void command_reloadlevelmods(Client *c, const Seperator *sep)
|
void command_reloadlevelmods(Client *c, const Seperator *sep)
|
||||||
{
|
{
|
||||||
if (sep->arg[1][0] == 0) {
|
if (!RuleB(Zone, LevelBasedEXPMods)) {
|
||||||
if (RuleB(Zone, LevelBasedEXPMods)) {
|
c->Message(Chat::White, "Level based experience modifiers are disabled.");
|
||||||
zone->LoadLevelEXPMods();
|
return;
|
||||||
c->Message(Chat::Yellow, "Level based EXP Mods have been reloaded zonewide");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
c->Message(Chat::Yellow, "Level based EXP Mods are disabled in rules!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->Message(Chat::White, "Attempted to reload level based experience modifiers globally.");
|
||||||
|
auto pack = new ServerPacket(ServerOP_ReloadLevelEXPMods, 0);
|
||||||
|
worldserver.SendPacket(pack);
|
||||||
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2073,6 +2073,35 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
|
parse->LoadPerlEventExportSettings(parse->perl_event_export_settings);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ServerOP_ReloadLevelEXPMods: {
|
||||||
|
if (zone) {
|
||||||
|
worldserver.SendEmoteMessage(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
AccountStatus::GMAdmin,
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"Level based experience modifiers reloaded for {}{}.",
|
||||||
|
fmt::format(
|
||||||
|
"{} ({})",
|
||||||
|
zone->GetLongName(),
|
||||||
|
zone->GetZoneID()
|
||||||
|
),
|
||||||
|
(
|
||||||
|
zone->GetInstanceID() ?
|
||||||
|
fmt::format(
|
||||||
|
" (Instance ID {})",
|
||||||
|
zone->GetInstanceID()
|
||||||
|
) :
|
||||||
|
""
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
zone->LoadLevelEXPMods();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ServerOP_ReloadAAData: {
|
case ServerOP_ReloadAAData: {
|
||||||
if (zone) {
|
if (zone) {
|
||||||
worldserver.SendEmoteMessage(
|
worldserver.SendEmoteMessage(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user