@alpaca-software/40kdc-data
    Preparing search index...

    Function resolveAttachmentPartners

    • Every roster unit attached to unitId, resolved from either end of the attachment. A leader+bodyguard are one combined unit, so a selection UI may start from either half:

      • unitId is the bodyguard → the leader(s) whose leader_attachment.bodyguard_ref.id points at it (body-first, the resolveAttachedLeader direction), and
      • unitId is the leader → the bodyguard its own leader_attachment points to. Returns the partner RosterUnits (deduped, source order). Empty when the unit has no attachment in this roster — the common case, since attachments are optional at game start. Shaped as a list to carry 11th edition's multi-member attachments without an API change.

      Parameters

      • roster: Roster
      • unitId: string

      Returns RosterUnit[]