Repository navigation
Row 3025: a scroll that destroys a worn equip brings HP and MP down to the new max - #1521
Merged
Merged
Conversation
…it, brings HP and MP down to the new max Found by hand in P436 (Clean Slate): destroying a worn Time Traveler's Circle (+120 MP) left the client at 9311/9305 MP. Cosmic's ScrollHandler calls equipChanged after a success or a curse on a worn equip, and its updateLocalStats enforces the max; use_scroll now does the same with Player::fit_hp_mp and the handler sends HP and MP.
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.
Found by hand in P436 (Clean Slate on worn gear): when a cursed scroll destroyed a worn equip that raised max MP, HP and MP stayed above the new max (the client showed 9311/9305 MP).
Cosmic's ScrollHandler calls `equipChanged()` after a success or curse on a worn equip, and `updateLocalStats` then runs `enforceMaxHpMp`. `use_scroll` now calls `Player::fit_hp_mp` after a non-failed scroll on a worn equip (the Legendary Spirit Equip-tab path is unaffected), and the handler sends HP and MP when they changed.