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.
Note: This is based off research in the #727 refactor but glancing at the #667 client the number of types and their mappings are backwards compatible.
Packet decoding for the various enum types:
Type explanations
INSTANCE (STANDARD):
This one operates essentially identical to the standard buildMapRegion logic other than supporting the customized zones so nothing really to note about the logic.
INSTANCE_NO_ENTITY_RESET (STANDARD_NO_ENTITY_RESET)
Only one difference from the standard from what I can see regarding this one. Every time a region build comes in, the client will reset entities using the following function. As you can see, the NO_ENTITY_RESET and NO_RELOAD_UPDATE_ZONE variants are excluded from this logic so the entities don't need to be reinitialized on this type.
INSTANCE_LARGE (LARGE)
The reason I call the remaining two types LARGE is due to how they differ with the following boolean in their enums in the client. The last 2 types contain a boolean set to true that I identify as "ignoreUpdateZoneSizeLimitations".
Here is how that second boolean is used throughout the UpdateZone packets:
It seems to override the check for whether the update should be rendered to the player or not which is why I called it LARGE.
INSTANCE_LARGE_NO_RELOAD_UPDATEZONES (LARGE_NO_RELOAD_UPDATEZONES)
This one retains all the same logic as the above LARGE type except has extra logic that prevents update zone items from being deleted. My guess is that this mode is used for areas like dungeoneering to save a large amount of bandwidth not having to reload all objs, locs, loc changes, etc every time a room is opened.