The update of the onPartyChange event is unreliable, so player.job may be inaccurate.
Souma-Sumire opened this issue · 4 comments
The entire text was generated by a translation software. If there are any parts that are not clear, please let me know.
Outside of duties (such as hunting, Timeworn Maps, etc.), if a party member changes their job, it will not trigger the onPartyChange event.
Consequently, we often observe situations where healers/DPS use 'Provoke'.
This trigger will promptly update the job, addressing the aforementioned issue.
{
id: 'General Update Player Job',
type: 'AddedCombatant',
netRegex: {},
condition: (_data, matches) => {
return matches.id.startsWith('1') && matches.job !== '00';
},
run: (data, matches, _output) => {
const target = data.party.details.find((v) => v.name === matches.name);
if (target) {
target.job = parseInt(matches.job, 16);
}
},
},
But perhaps a better solution would be to modify the triggering timing of OverlayPlugin's PartyChange.
I think we could add a handler for AddedCombatant to party.ts
(e.g. onAddedCombatant
) with this code, and then call it from popup-text.ts
OnNetLog
as needed.
But perhaps a better solution would be to modify the triggering timing of OverlayPlugin's PartyChange.
Also, yes. Fixing OverlayPlugin to have more reliable party events would also help here, but I think that's much harder.
Re: Fixing OverlayPlugin events, I have an open PR for this but I'm working on what I believe is a better solution that doesn't rely on updating FFXIVClientStructs every patch, but it's still very much work in progress unfortunately.
This should be fixed by OverlayPlugin/OverlayPlugin#226