mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31: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);
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto debounce_reload = std::chrono::system_clock::now();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param connection
|
* @param connection
|
||||||
* @param command
|
* @param command
|
||||||
@ -934,6 +936,14 @@ void ConsoleReloadZoneQuests(
|
|||||||
return;
|
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];
|
std::string zone_short_name = args[0];
|
||||||
|
|
||||||
connection->SendLine(fmt::format("Reloading Zone [{}]...", zone_short_name));
|
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);
|
zone->SetQuestHotReloadQueued(true);
|
||||||
} else if (request_zone_short_name == "all") {
|
} else if (request_zone_short_name == "all") {
|
||||||
std::string reload_quest_saylink = Saylink::Silent("#reload quest", "Locally");
|
std::string reload_quest_saylink = Saylink::Silent("#reload quest", "Locally");
|
||||||
std::string reload_world_saylink = Saylink::Silent("#reload world", "Globally");
|
std::string reload_world_saylink = Saylink::Silent("#reload world 1", "Globally");
|
||||||
worldserver.SendEmoteMessage(
|
for (const auto& [client_id, client] : entity_list.GetClientList()) {
|
||||||
0,
|
if (client->Admin() < AccountStatus::ApprenticeGuide) {
|
||||||
0,
|
continue;
|
||||||
AccountStatus::ApprenticeGuide,
|
}
|
||||||
Chat::Yellow,
|
|
||||||
fmt::format(
|
client->Message(Chat::Yellow, fmt::format(
|
||||||
"A quest, plugin, or global script has changed. Reload: [{}] [{}]",
|
"A quest, plugin, or global script has changed. Reload: [{}] [{}]",
|
||||||
reload_quest_saylink,
|
reload_quest_saylink,
|
||||||
reload_world_saylink
|
reload_world_saylink
|
||||||
).c_str()
|
).c_str());
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user