handlers: unit operations — fusion, evolution, selling, and favourites - #34
Open
Seltraeh wants to merge 1 commit into
Open
handlers: unit operations — fusion, evolution, selling, and favourites#34Seltraeh wants to merge 1 commit into
Seltraeh wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
handlers: unit operations — fusion, evolution, selling, and favourites
Branch:
split/05-unitsBase:
devMerge position: 05 of 13
Largest PR in the series at ~790 lines, but it's four independent handlers sharing one helper.
What's included
UnitMixMw08CIg2UnitEvo0gUSE84eUnitSellRi3uTq9bUnitFavorite2p9LHCNhUnitEvoemits 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 touser_items.Splitting further
If ~790 lines is too much in one pass, this divides cleanly into
UnitMix+UnitEvo(~600) andUnitSell+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.