[Zone] Zone State Automated Testing and Improvements (#4808)

* [Zone] Zone State Automated Testing and Improvements

* Spawn condition

* Update zone.cpp

* Remove redundant logic

* Update zone_state.cpp

* TestZLocationDrift

* Protect NPC resumed NPC's from being able to die
This commit is contained in:
Chris Miles
2025-03-30 01:45:28 -05:00
committed by GitHub
parent c8a7066d0e
commit b9cfdea76c
23 changed files with 1312 additions and 168 deletions
+1 -6
View File
@@ -887,10 +887,7 @@ void Zone::Shutdown(bool quiet)
c.second->WorldKick();
}
bool does_zone_have_entities =
zone && zone->IsLoaded() &&
(!entity_list.GetNPCList().empty() || !entity_list.GetCorpseList().empty());
if (RuleB(Zone, StateSavingOnShutdown) && does_zone_have_entities) {
if (RuleB(Zone, StateSavingOnShutdown) && zone && zone->IsLoaded()) {
SaveZoneState();
}
@@ -1537,7 +1534,6 @@ bool Zone::Process() {
spawn_conditions.Process();
if (spawn2_timer.Check()) {
LinkedListIterator<Spawn2 *> iterator(spawn2_list);
EQ::InventoryProfile::CleanDirty();
@@ -3295,5 +3291,4 @@ void Zone::ReloadMaps()
pathing = IPathfinder::Load(map_name);
}
#include "zone_save_state.cpp"
#include "zone_loot.cpp"