Only deduct energy when elemental burst actually fires #2424
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.
Description
Elemental burst (Q) can misfire occasionally if done when dashing, doing elemental skill (E), or switching avatars. The client would still send EvtDoSkillSuccNotify, but the burst may not actually happen, and GC currently clears energy whether the burst happened or not.
Fix this by checking AbilityInvocationsNotify packets from the client. On successful bursts, there will be packets with information specific to the burst, like setting resistance/invincible state, AvatarSkillStart action. These can be used to decide when to clear energy and set invulnerability.
Also fix Wanderer's energy not clearing if bursting while floating.
This fix could use more testing. I can't exhaustively test through all characters and scenarios. But at least my quick swap teams in abyss no longer have any burst issue.
Preview:
Issues fixed by this PR
#1248
Type of changes
Checklist: