Skip to content

[GearSwap] equip_sets_exit pretarget cleanup part 1 - #2580

Merged
lili-ffxi merged 2 commits into
Windower:devfrom
Zirk40:zirk-flow-cleanup-1
Oct 20, 2026
Merged

lili-ffxi merged 2 commits into
Windower:devfrom
Zirk40:zirk-flow-cleanup-1

Conversation

@Zirk40

@Zirk40 Zirk40 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

outgoing text does a good job identifying if an item action is a trade or regular item use, but this check should be reperformed in the event the user pretarget function changes the target, since the target being an NPC or not affects if the requested action is a trade or not. Pretarget will use this this trade determination to decide which item packet to assemble in the same manner as outgoing text to maintain consistency.

filter_precast was upset that it only exists to do a single job, but an imposter was doing its job for it, so it ejected the imposter.

The outgoing_action_category_table check is unnecessary as the only way this check can fail is if we do not have a valid unified prefix, but outgoing text already validated the prefix.

Checking for the existence of command_registry[ts].proposed_packet was common to both item and action packet code paths, so it was pulled out to a common location to reduce code duplication.

After filter_precast ejected the imposter, there was a situation where one filter_precast check was nested inside another filter_precast check, so the inner check was removed since it is guaranteed to evaluate to true.

Dead code inside the action packet code path was deleted. This code is dead because its impossible for assemble_action_packet to return nil or false, and this is verifiable empirically because if the dead code were to ever execute, it is guaranteed to produce an error since it will concatenate nil with a string, and we'd have seen reports of this error by now.

outgoing text does a good job identifying if an item action is a trade or
regular item use, but this check should be reperformed in the event the user
pretarget function changes the target, since the target being an NPC or not
affects if the requested action is a trade or not. Pretarget will use this
this trade determination to decide which item packet to assemble in the same
manner as outgoing text to maintain consistency.

filter_precast was upset that it only exists to do a single job, but an
imposter was doing its job for it, so it ejected the imposter.

The outgoing_action_category_table check is unnecessary as the only way this
check can fail is if we do not have a valid unified prefix, but outgoing text
already validated the prefix.

Checking for the existence of command_registry[ts].proposed_packet was common
to both item and action packet code paths, so it was pulled out to a common
location to reduce code duplication.

After filter_precast ejected the imposter, there was a situation where one
filter_precast check was nested inside another filter_precast check, so the
inner check was removed since it is guaranteed to evaluate to true.

Dead code inside the action packet code path was deleted. This code is dead
because its impossible for assemble_action_packet to return nil or false, and
this is verifiable empirically because if the dead code were to ever execute,
it is guaranteed to produce an error since it will concatenate nil with a
string, and we'd have seen reports of this error by now.
@lili-ffxi
lili-ffxi merged commit d8f9630 into Windower:dev Oct 20, 2026
@Zirk40
Zirk40 deleted the zirk-flow-cleanup-1 branch October 20, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants