Skip to content

[core][cpp] Fix mob-linking behavior impacting Einherjar#9959

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
MarkWaldron:fix/einherjar-linking
May 9, 2026
Merged

[core][cpp] Fix mob-linking behavior impacting Einherjar#9959
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
MarkWaldron:fix/einherjar-linking

Conversation

@MarkWaldron
Copy link
Copy Markdown
Contributor

@MarkWaldron MarkWaldron commented May 6, 2026

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?

Resolves an issue with mobs of different families linking in Einherjar. It's a combination of two issues, one being MOBTYPE_BATTLEFIELD, and the other being force-link.

What this would look like is: pulling an Utgarth Bat would link the chamber's boss, even though the boss has no family or sublink relationship to bats.

Root cause

Regression in bbc703d620 ("add ability for mob families that don't link to link with subfamilies"). That commit reorganized the inner match in FindPartyForMob and added a force-link clause OR'd alongside the family/sublink clauses, which let force-link mobs with sublinks bridge two otherwise-disjoint groups.

Fix

In FindPartyForMob, treat force-link and family/sublink as mutually exclusive matching paths:

  • If the mob force-links, it only joins other force-link mobs.
  • Otherwise it joins via family or sublink as before.

Contained to one function in src/map/zone_entities.cpp. ShouldForceLink(), mob pools, family mods, and zone settings are unchanged.

Retail behavior reference

The June 9, 2008 FFXI version update explicitly changed Einherjar linking behavior:

"Monsters within Einherjar chambers will now link with one another in the same manner as enemies in other general areas."

Source: https://www.bg-wiki.com/ffxi/Version_Update_(06/09/2008)

Original-release Einherjar (June 6, 2007) had wave-wide linking regardless of proximity; SE patched that out in 2008. Current retail Einherjar links along normal family rules, which is what this fix restores. Boss-add interactions (Vampyr_Jarl transformation, Motsognir demon adds, Hildesvini Djiggas, etc.) are scripted spawn mechanics rather than links, and are unaffected by this change.

Test plan

Restart the map server before each test (party assignment runs at zone load).

  • Einherjar Wing 3, Vampyr Jarl chamber. Pull a single bat with a ranged attack. Verify only bats engage and Vampyr Jarl stays idle.
  • Einherjar Wing 3, non-Vampyr_Jarl chamber (e.g. Freke). Same check.
  • Einherjar Wing 1 and Wing 2 chambers. Same check.
  • Engage an Einherjar boss directly. Confirm normal-family adds and chamber boss adds (Vampyr_Bats, Vampyr_Wolf for Vampyr_Jarl) still behave correctly.
  • Dynamis. Pull one mob, verify Dynamis-style zone-wide linking still occurs.
  • Limbus or Salvage run. Verify battlefield mobs still link inside the same battlefield instance and not across instances.
  • Open-world zone with bats and vampyrs (e.g. Castle Zvahl Baileys). Verify they still link via their shared sublink.

@MarkWaldron MarkWaldron force-pushed the fix/einherjar-linking branch from 5207b53 to 1fe5cac Compare May 7, 2026 05:31
Use SUPERLINK for BCNM party matching. Force-link mobs now
require a family or sublink match instead of linking with
all other force-link mobs indiscriminately.
@MarkWaldron MarkWaldron force-pushed the fix/einherjar-linking branch from 1fe5cac to 2ee4c8f Compare May 7, 2026 05:40
@MarkWaldron MarkWaldron marked this pull request as ready for review May 7, 2026 13:41
@Xaver-DaRed Xaver-DaRed merged commit f85c15d into LandSandBoat:base May 9, 2026
10 checks passed
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