[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
+9 -5
View File
@@ -191,16 +191,20 @@ bool Spawn2::Process() {
return false;
}
uint16 condition_value=1;
uint16 condition_value = 1;
if (condition_id > 0) {
condition_value = zone->spawn_conditions.GetCondition(zone->GetShortName(), zone->GetInstanceID(), condition_id);
condition_value = zone->spawn_conditions.GetCondition(
zone->GetShortName(),
zone->GetInstanceID(),
condition_id
);
}
//have the spawn group pick an NPC for us
uint32 npcid = 0;
if (RuleB(Zone, StateSavingOnShutdown) && currentnpcid && currentnpcid > 0) {
npcid = currentnpcid;
if (m_resumed_npc_id > 0) {
npcid = m_resumed_npc_id;
m_resumed_npc_id = 0;
} else {
npcid = spawn_group->GetNPCType(condition_value);
}