mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Quests] Hot Reload Changes (#4302)
* [Quests] Hot Reload Changes * snake_case
This commit is contained in:
parent
fe136e58e4
commit
257935d33a
@ -918,6 +918,8 @@ void ConsoleReloadWorld(
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
auto debounce_reload = std::chrono::system_clock::now();
|
||||
|
||||
/**
|
||||
* @param connection
|
||||
* @param command
|
||||
@ -934,6 +936,14 @@ void ConsoleReloadZoneQuests(
|
||||
return;
|
||||
}
|
||||
|
||||
// if now is within 1 second, return
|
||||
if (std::chrono::system_clock::now() - debounce_reload < std::chrono::seconds(1)) {
|
||||
debounce_reload = std::chrono::system_clock::now();
|
||||
return;
|
||||
}
|
||||
|
||||
debounce_reload = std::chrono::system_clock::now();
|
||||
|
||||
std::string zone_short_name = args[0];
|
||||
|
||||
connection->SendLine(fmt::format("Reloading Zone [{}]...", zone_short_name));
|
||||
|
||||
@ -3550,18 +3550,18 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
zone->SetQuestHotReloadQueued(true);
|
||||
} else if (request_zone_short_name == "all") {
|
||||
std::string reload_quest_saylink = Saylink::Silent("#reload quest", "Locally");
|
||||
std::string reload_world_saylink = Saylink::Silent("#reload world", "Globally");
|
||||
worldserver.SendEmoteMessage(
|
||||
0,
|
||||
0,
|
||||
AccountStatus::ApprenticeGuide,
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
std::string reload_world_saylink = Saylink::Silent("#reload world 1", "Globally");
|
||||
for (const auto& [client_id, client] : entity_list.GetClientList()) {
|
||||
if (client->Admin() < AccountStatus::ApprenticeGuide) {
|
||||
continue;
|
||||
}
|
||||
|
||||
client->Message(Chat::Yellow, fmt::format(
|
||||
"A quest, plugin, or global script has changed. Reload: [{}] [{}]",
|
||||
reload_quest_saylink,
|
||||
reload_world_saylink
|
||||
).c_str()
|
||||
);
|
||||
).c_str());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user