Increases inventory storage ItemNum2 to uint16 to fix uint8 overflow #5725
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.
I affirm:
What does this pull request do?
Per the information provided here and through some discussions with WinterSolstice - determined the underlying packets for inventory storage should be supporting
uint16
notuint8
.This matters for Mog House Storage which has a total storage size which can exceed 255.
In a previous PR I resolved the player's available storage space getting truncated to lower than expected values due to uint8 overflow internal to the server. E.g. The player would expect to have 80 storage, and would only have say 10 accessable storage.
This PR ensures the correct values are also sent to the client - where the client uses the information to determine if a player should be allowed to remove placed furniture. When the values sent to the client overflow, players are unable to remove laid out furniture if the client believe the removal would orphan items in storage.
E.g. The player has 266 storage, 4 wells (240), a bookshelf (20), and 6 Aquariums and has 7 items in storage. When overflowing - the client will believe the player only has ~10 available storage space and will incorrectly prevent the removal of the bookshelf and the wells.
Steps to test these changes
Post this PR
On step 4 - you can remove all large storage items, or all large storage items but 1 if you remove the single item furnishings. Essentially
works as intended