[Quests] Reload Quests on Bootup, Init earlier (#4298)

* [Quests] Reload Perl quests on bootup, init earlier

* Do reload on top of init
This commit is contained in:
Chris Miles 2024-05-04 19:57:16 -05:00 committed by GitHub
parent 6dd061cba2
commit f07c5901f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -223,6 +223,11 @@ PerlembParser::~PerlembParser()
safe_delete(perl);
}
void PerlembParser::Init()
{
ReloadQuests();
}
void PerlembParser::ReloadQuests()
{
try {

View File

@ -138,6 +138,7 @@ public:
virtual void AddVar(std::string name, std::string val);
virtual std::string GetVar(std::string name);
virtual void Init() override;
virtual void ReloadQuests();
virtual uint32 GetIdentifier() { return 0xf8b05c11; }

View File

@ -108,6 +108,9 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool is_static) {
numclients = 0;
zone = new Zone(iZoneID, iInstanceID, zonename);
parse->Init();
parse->ReloadQuests(true);
//init the zone, loads all the data, etc
if (!zone->Init(is_static)) {
safe_delete(zone);
@ -158,7 +161,6 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool is_static) {
LogInfo("Zone server [{}] listening on port [{}]", zonename, ZoneConfig::get()->ZonePort);
LogInfo("Zone bootup type [{}] short_name [{}] zone_id [{}] instance_id [{}]",
(is_static) ? "Static" : "Dynamic", zonename, iZoneID, iInstanceID);
parse->Init();
UpdateWindowTitle(nullptr);
// Dynamic zones need to Sync here.