[Crash] Fix world repop crash (#4742)

This commit is contained in:
Chris Miles 2025-03-03 00:04:39 -06:00 committed by GitHub
parent 212969f5cd
commit 3902230fa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -894,7 +894,8 @@ void ZSList::SendServerReload(ServerReload::Type type, uchar *packet)
ServerReload::Type::Commands,
ServerReload::Type::PerlExportSettings,
ServerReload::Type::DataBucketsCache,
ServerReload::Type::WorldRepop
ServerReload::Type::WorldRepop,
ServerReload::Type::WorldWithRespawn
};
// Set requires_zone_booted flag before executing reload logic

View File

@ -4661,16 +4661,20 @@ void WorldServer::ProcessReload(const ServerReload::Request& request)
break;
case ServerReload::Type::WorldRepop:
entity_list.ClearAreas();
parse->ReloadQuests();
zone->Repop();
if (zone && zone->IsLoaded()) {
entity_list.ClearAreas();
zone->Repop();
}
break;
case ServerReload::Type::WorldWithRespawn:
entity_list.ClearAreas();
parse->ReloadQuests();
zone->Repop();
zone->ClearSpawnTimers();
if (zone && zone->IsLoaded()) {
entity_list.ClearAreas();
zone->Repop();
zone->ClearSpawnTimers();
}
break;
case ServerReload::Type::ZonePoints: