Skip to content

handlers: populate the reinforcement slot from FriendGet - #37

Open
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/08-friend
Open

handlers: populate the reinforcement slot from FriendGet#37
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/08-friend

Conversation

@Seltraeh

@Seltraeh Seltraeh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

handlers: populate the reinforcement slot from FriendGet

Branch: split/08-friend
Base: dev
Merge position: 08 of 13

Part of the PR #28 split. Each PR branches from dev and contains only its
own changes, so this diff is exactly one subsystem. The set is designed to be
merged in numeric order; merging all 13 reproduces PR #28 byte for byte
(verified against tree 79a4e065).

Later PRs in the series touch Handlers.hpp, GmeControllerHandlers.cpp and
UserInfo.cpp too, so once earlier ones land this branch may need a rebase.
Those conflicts are always additions on both sides — keep both. Maintainer
edits are enabled, so feel free to push the rebase directly to this branch.

One file. Makes the squad-select reinforce slot functional.

What's included

FriendGet now emits both lists, because the picker reads from either depending on which UI path the binary takes:

  • xZH6EIQ7 carrying ReinforcementInfo
  • tojMy68W carrying FriendInfo

The placeholder entry is built from the player's active-deck leader, falling back to their highest-level unit.

Two things worth knowing

The out-of-range user_unit_id is deliberate. The placeholder uses a value that cannot match a real row, so post-battle cleanup can't delete one of the player's own units.

FriendInfo.element takes a uint32_t, unlike UserUnitInfo which takes a string for the same concept. The element is converted on the way out. This contextual overload has bitten us before.

Verification

Squad select shows the placeholder friend; the friend's unit appears in slot 6 in battle; the Social tab Friend Info dialog renders.

Populates the reinforcement slot in squad select.

The picker reads from two lists depending on the UI path taken, so FriendGet
now emits both: xZH6EIQ7 carrying ReinforcementInfo and tojMy68W carrying
FriendInfo. The placeholder entry is built from the player's active-deck
leader, falling back to their highest-level unit.

The placeholder's user_unit_id is deliberately set to an out-of-range value so
post-battle cleanup cannot match and delete a real user_units row.

Note that FriendInfo.element takes a uint32_t, unlike UserUnitInfo which takes
a string for the same concept, so the element is converted on the way out.
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