Skip to content

[06] Persist legacy respawn timers#91

Open
alseif0x wants to merge 3 commits into
3.4.3from
18-06-m05-persist-respawns-to-a-db-respawn-table
Open

[06] Persist legacy respawn timers#91
alseif0x wants to merge 3 commits into
3.4.3from
18-06-m05-persist-respawns-to-a-db-respawn-table

Conversation

@alseif0x

@alseif0x alseif0x commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Refs #18

QA pending: do not merge until manual restart QA, capture/runtime validation, CI, and Codex reviewer verdict are complete.

Summary:

  • Adds C++-shaped respawn rows and CharacterDB respawn statements.
  • Persists legacy creature/gameobject respawn timers.
  • Rehydrates pending creature respawns after restart-equivalent load.

Validation reported locally:

  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world --lib
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server
  • cargo fmt --all -- --check
  • git diff --check

Manual QA pending: kill mob, confirm characters.respawn row, restart world-server, verify respawn survives and row clears after respawn.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 433a2df494

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/wow-world/src/session.rs

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

QA validation checklist:

  • Kill a normal creature and wait for the corpse to despawn; it should not immediately reappear before its respawn delay.
  • Move away and back, or use a second client/player to reload the same grid before the respawn delay; the creature should still stay absent until its timer expires.
  • After the delay, confirm the creature respawns once, not duplicated.
  • If practical, restart/relog during the respawn delay and confirm the timer is preserved rather than spawning immediately.
  • Verify no stale/dead creature remains visible after respawn.

Note: this PR still has an actionable Codex review item being fixed before it can be considered review-ready.

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Addressed the P1 review item by mirroring GlobalLegacy corpse-despawn respawn timers into the canonical wow_map::Map respawn store, matching C++ Map::SaveRespawnTime (AddRespawnInfo + DB save). Ready respawns now also remove the canonical timer before reinserting the creature, so a grid reload cannot rehydrate a stale/missing-timer spawn.

Validation run locally:

  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world legacy_creature_lifecycle_tick_once_ --lib
  • cargo fmt --all -- --check
  • git diff --check
  • PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdf2b6a0af

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/wow-world/src/session.rs Outdated
Comment thread crates/wow-world/src/session.rs
@alseif0x alseif0x force-pushed the 18-06-m05-persist-respawns-to-a-db-respawn-table branch from bdf2b6a to 2046029 Compare July 4, 2026 11:03
@alseif0x

alseif0x commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Updated in 2046029 after rebasing onto current 3.4.3:

  • Resolved the rebase conflict preserving the VMap LOS import and respawn object-type import.
  • Made canonical respawn timer install + corpse removal happen under one canonical map lock, with the timer inserted before exposing the object removal.
  • Cleared the legacy persisted timer / queued DEL_RESPAWN when canonical processing already mirrored the ready creature back into legacy first.
  • Added a regression for the canonical-won stale timer case.

Validated locally with focused lifecycle tests, fmt, diff check, and PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 20460298f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[06] [M0.5] Persist respawns to a DB respawn table

1 participant