Skip to content

[Zone State] Load New Spawn2 Data When Present#4889

Merged
Akkadius merged 1 commit intomasterfrom
akkadius/zone-state-spawn2-load-new
May 16, 2025
Merged

[Zone State] Load New Spawn2 Data When Present#4889
Akkadius merged 1 commit intomasterfrom
akkadius/zone-state-spawn2-load-new

Conversation

@Akkadius
Copy link
Copy Markdown
Contributor

Description

Fixes a rarer scenario where when an NPC is added to a zone from a separate instance or through a content database transfer publish, zone state is missing new spawns that were added to the database that are a part of the base zone spawn data.

This change looks for any entries in the base spawn entries and compares them with zone state and adds them.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

I manually inserted a spawn2 entry to the table for "halas" and it picked it up after initial zone restore

  Zone | ZoneState  | AddLootTable NPC [bind trap] is resuming from zone suspend, skipping 
  Zone | ZoneState  | AddLootTable NPC [Hasten Bootstrutter] is resuming from zone suspend, skipping 
  Zone | ZoneState  | LoadZoneState Missing spawn2 [3266010] in zone state, this NPC spawn was newly created
  Zone | ZoneState  | PopulateZoneSpawnList Loaded zone state for zone [halas] instance_id [0] 

image

You can then see two Hasten Bootstrutter's (I had one in there for handin testing before)

image

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@Akkadius Akkadius merged commit c822667 into master May 16, 2025
2 checks passed
@Akkadius Akkadius deleted the akkadius/zone-state-spawn2-load-new branch May 16, 2025 18:39
@Akkadius Akkadius mentioned this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants