mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Fix] Zone State Variables Load First (#4798)
This commit is contained in:
parent
46511365a7
commit
bb70850421
@ -365,7 +365,7 @@ inline void LoadNPCState(Zone *zone, NPC *n, ZoneStateSpawnsRepository::ZoneStat
|
||||
n->Depop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
n->SetPosition(s.x, s.y, s.z);
|
||||
n->SetHeading(s.heading);
|
||||
n->SetResumedFromZoneSuspend(true);
|
||||
@ -453,12 +453,16 @@ bool Zone::LoadZoneState(
|
||||
zone->initgrids_timer.Trigger();
|
||||
zone->Process();
|
||||
|
||||
// load zone variables first
|
||||
for (auto &s: spawn_states) {
|
||||
if (s.is_zone) {
|
||||
LoadZoneVariables(zone, s.entity_variables);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// spawn2
|
||||
for (auto &s: spawn_states) {
|
||||
if (s.spawngroup_id == 0 || s.is_corpse || s.is_zone) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user