Skip to content

[core, sql] Allow customized spawn times for TOTD mobs#10463

Draft
sruon wants to merge 1 commit into
LandSandBoat:basefrom
sruon:spawn_time_rework
Draft

[core, sql] Allow customized spawn times for TOTD mobs#10463
sruon wants to merge 1 commit into
LandSandBoat:basefrom
sruon:spawn_time_rework

Conversation

@sruon

@sruon sruon commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

  • Adds 2 columns to mob_spawn_points: spawnTime, despawnTime. NULL-able
  • Sets it on CMobEntity when set in SQL
  • Spawn handler accounts for it (higher priority than existing SPAWNTYPE_)
  • Sets the proper values according to 🔨 Implement Nighttime Bat timeslots by ID #10408 (the bats + all undeads in Zitah)
  • Drop the TOTD routing (time server -> spawn handler) in favor of Vanadiel game hours
    • Aware it removes some code from CInstance but I believe it was bugged to begin with and it should now correctly forward TOTD events to instances. Not that any instance makes use of it at the moment.
  • Bunch of tests including spawn slots

Closes #10408

Steps to test these changes

Draft for a few days while I'm out

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

✨ Hello and thanks for the PR! ✨

🤖: This is a friendly automated reminder that the maintainers won't look at your PR until you've properly completed all of the checkboxes in the pre-filled template.

Co-Authored-By: Valentine-PHX <231148762+Valentine-PHX@users.noreply.github.com>
@sruon sruon force-pushed the spawn_time_rework branch from a67420e to 530da5d Compare July 2, 2026 01:16
return this->spawnSlot;
}

auto CMobEntity::spawnWindow() const -> const Maybe<std::pair<uint8, uint8>>&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

An alias for using SpawnWindow = std::pair<uint8, uint8>; would help this code a lot, or a struct to a similar effect

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.

🔨 Implement Nighttime Bat timeslots by ID

2 participants