[gearswap] Fix issue with packet initialization. #2374
Merged
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.
Partially reverts #2026.
Previously, gearswap would be disabled by default during addon load, and only be enabled once an userprofile was loaded.
A side effect of this was that the ability of gearswap to enable game commands with a numeric ID for a target (i.e.
/ma "Fire V" 123456) was disabled without an userprofile loaded.#2026 was meant to address this, but in the meantime it broke a bunch of functions that relied on the disabled flag to be aware that gearswap was being loaded.
This change fixes the issue by making
gearswap_disabled = trueon load again, and setting it tofalseas desired only once all the addon components have been loaded and the packet information has been fully parsed, solving the issue entirely.