Skip to content

handlers: unit operations — fusion, evolution, selling, and favourites - #34

Open
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/05-units
Open

handlers: unit operations — fusion, evolution, selling, and favourites#34
Seltraeh wants to merge 1 commit into
decompfrontier:devfrom
Seltraeh:split/05-units

Conversation

@Seltraeh

@Seltraeh Seltraeh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

handlers: unit operations — fusion, evolution, selling, and favourites

Branch: split/05-units
Base: dev
Merge position: 05 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.

Largest PR in the series at ~790 lines, but it's four independent handlers sharing one helper.

What's included

Handler Request Purpose
UnitMix Mw08CIg2 XP fusion with Great/Super multipliers, zel debit, full reinforcement + team payload
UnitEvo 0gUSE84e Evolve, preserving IMP stats
UnitSell Ri3uTq9b Delete rows, credit zel
UnitFavorite 2p9LHCNh Persist lock flag

UnitEvo emits all five response fields including the original MST id. Omitting it crashes the client during the evolution animation.

The important bit

All three destructive handlers call returnEquippedSpheres() before their DELETE. Equipped spheres are owned items; deleting the unit row without returning them first destroys them silently with no player feedback. This is why the PR is sequenced after Items — the helper writes to user_items.

Splitting further

If ~790 lines is too much in one pass, this divides cleanly into UnitMix+UnitEvo (~600) and UnitSell+UnitFavorite (~190). They share nothing beyond the helper. Happy to split on request.

Verification

Fuse, evolve and sell a unit with spheres equipped; confirm the spheres reappear in the warehouse each time.

Implements the four unit management operations.

UnitMix fuses fodder units for XP with the Great and Super success
multipliers, debits zel and returns the full reinforcement and team payload.
UnitEvo evolves a unit, preserving IMP stats and emitting all five response
fields including the original MST id, without which the client crashes during
the evolution animation. UnitSell deletes rows and credits zel. UnitFavorite
persists the lock flag, and UserInfo reports it back so locks survive a
reload.

All three destructive handlers call returnEquippedSpheres() before their
DELETE. Equipped spheres are owned items; deleting the unit row without
returning them first destroys them with no feedback to the player.
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