Skip to content

Null Spellbook Cannot be Manually Cast & Update Animations for WalkMerge - #184

Merged
Lexer747 merged 3 commits into
ngraves95:mainfrom
Lexer747:spell_book_fixes
Sep 5, 2026
Merged

Lexer747 merged 3 commits into
ngraves95:mainfrom
Lexer747:spell_book_fixes

Conversation

@Lexer747

@Lexer747 Lexer747 commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

I finally got the hint when #181 was raised - the reason it was so inconsistent to reproduce these bugs (and #126) is that it would only occur when the spell book the player was using was Ancients. So once I had an easy reproducer it was much easier to debug.

The underlying cause of the bugs is because the guantlet staves and eye both (re)use the shadow spell sound effect. Therefore the plugin was mistakenly thinking the player had manually cast shadow spell.

There is two targeted fixes as a consequence.

  1. The eye already has the animations in the plugin both of which don't list a spellbook (correct) but in the matchesSpellbook function in src\main\java\com\attacktimer\AttackSpeed.java this incorrectly means that the plugin falls through and only relies on the sound effect to determine manual casting (incorrect). So an extra explicit guard is added to the function to return false early if the animation has a null spellbook as we know that this animation cannot possibly be a manual cast.
  2. The gauntlet staves don't need this fix because the animations they use are "standard", but there's a set of "WALKMERGE" animations which the staves can use. These cause curAnimation to be null since we don't have an enum for it and obviously can't match a powered stave from src\main\java\com\attacktimer\PoweredStaves.java because we don't know about them. This then causes the plugin to fallthrough to the matchesSpellbook function which detects the shadow spell sound effect and then returns a manual cast. Therefore the fix here is simply too register the WALKMERGE animations in AnimationData and ensure the staves in PoweredStaves which all used to only refer to MAGIC_STANDARD_WAVE_STAFF now also refer to MAGIC_STANDARD_WAVE_STAFF_WALK.

Fixes #181
Fixes #165
Fixes #126

Testing

Gauntlet:

java_Pe7rJUzLJ6.mp4

Eye of Ayak

java_ZTe6s8Bh0L.mp4

@Lexer747
Lexer747 merged commit 1b1e6bd into ngraves95:main Sep 5, 2026
1 check passed
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.

CG weapon timers are wrong Corrupted Staff in the Corrupted Gauntlet causes issues Eye of Ayak First Attack

1 participant