Skip to content

Fix incorrect NPC map list registration during transitions#456

Open
dm94 wants to merge 3 commits into
darkbot-reloaded:masterfrom
dm94:fix/npc-map-list-pollution-8007670434530817406
Open

Fix incorrect NPC map list registration during transitions#456
dm94 wants to merge 3 commits into
darkbot-reloaded:masterfrom
dm94:fix/npc-map-list-pollution-8007670434530817406

Conversation

@dm94

@dm94 dm94 commented May 7, 2026

Copy link
Copy Markdown
Contributor
  • Reordered entity update and map switch in MapManager to prevent old entities from being associated with new map IDs.
  • Added validation in ConfigEntity to ensure only positive map IDs are added to NpcInfo mapList.

google-labs-jules Bot and others added 3 commits May 7, 2026 18:32
- Reordered entity update and map switch in MapManager to prevent old entities from being associated with new map IDs.
- Added validation in ConfigEntity to ensure only positive map IDs are added to NpcInfo mapList.

Co-authored-by: dm94 <7419213+dm94@users.noreply.github.com>
- Moved mapManager.tick() before hero.tick() in Main.java to ensure map ID is updated before hero/pet processing.
- Added entities.clear() before switchMap in MapManager.update to purge stale entities during transitions.
- Added mapId > 0 validation in ConfigEntity when adding to NpcInfo mapList to prevent invalid map IDs from being recorded.

Co-authored-by: dm94 <7419213+dm94@users.noreply.github.com>
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.

1 participant