Windower / Lua

Lua Addons and Scripts
242 stars 429 forks source link

[gearswap] Fix issue with packet initialization. #2374

Closed lili-ffxi closed 2 months ago

lili-ffxi commented 2 months ago

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 = true on load again, and setting it to false as desired only once all the addon components have been loaded and the packet information has been fully parsed, solving the issue entirely.