Skip to content

fix: NPCs disappearing when targets enter different map instances#2798

Closed
Arufonsu wants to merge 1 commit into
mainfrom
fix/2769
Closed

fix: NPCs disappearing when targets enter different map instances#2798
Arufonsu wants to merge 1 commit into
mainfrom
fix/2769

Conversation

@Arufonsu
Copy link
Copy Markdown
Contributor

@Arufonsu Arufonsu commented Jan 9, 2026

When a player aggros an NPC and then enters a different map instance (dungeon, dies, etc.), the NPC would attempt to reset and chase an unreachable target. This caused NPCs to become stuck in a reset loop or disappear from their spawn map entirely.

The fix clears the NPC's target and aggro center immediately when the target switches to a different MapInstanceId, preventing the NPC from attempting to path to or reset towards an unreachable location.

(Hopefully) Fixes #2769

@Arufonsu Arufonsu added bug Something isn't working help wanted Issues/features that are available to be worked on by anyone labels Jan 9, 2026
@Arufonsu Arufonsu requested review from a team January 9, 2026 02:53
@Arufonsu Arufonsu marked this pull request as draft March 1, 2026 01:13
When a player aggros an NPC and then enters a different map instance
(dungeon, dies, etc.), the NPC would attempt to reset and chase an
unreachable target. This caused NPCs to become stuck in a reset loop
or disappear from their spawn map entirely.

The fix clears the NPC's target and aggro center immediately when the
target switches to a different MapInstanceId, preventing the NPC from
attempting to path to or reset towards an unreachable location.

Fixes #2769

Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
@pandinocoder pandinocoder marked this pull request as ready for review March 13, 2026 17:36
@Arufonsu Arufonsu closed this May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working help wanted Issues/features that are available to be worked on by anyone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Npcs disappearing when a player aggro that and leave the map (Die, enter instance, etc)

2 participants