Repository navigation
Review follow-ups: rank lookup backoff, raid ready chat, emote clicks, war board on world swap - #34
Merged
Merged
Conversation
A failed lookup (API error or a guildless player) never stamped lastRefresh, so the per-tick menu scrapers fired one Wynncraft API request after another whenever a container was open without a known rank. ensureFresh is also reached from the websocket thread, so it is now synchronized.
The ready/start patterns match anywhere in a line, so guild chat like "food is ready!" counted as a player readying and "I would like to start a raid!" reset the tracker. Wynncraft's own lines never contain a colon; player chat always does.
Vanilla buttons already play the click sound; the extra playDownSound calls made add/delete/set-active/randomize click twice.
… never get a timer A world swap fires JOIN while the bridge socket stays open, and the bot only sends the board to new connections, so wiping it on JOIN left queuer and goer heads gone until the next board change. JOIN now clears only this world's sidebar tracking; disconnect still clears everything. Board-owned queuers now follow the board (a dropped one is removed instead of being kept by putIfAbsent), and local-only queuers (chat reports, unechoed attacks) are dropped after 30s with no attack timer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes from the review of the last 13 commits. One commit per fix, so it can be reviewed commit by commit.
fix(rewards): back off guild rank lookups for 60s after any attempt
A failed rank lookup (API error, or a player with no guild) never recorded the attempt, so with any container open the menu scrapers fired one Wynncraft API request after another. Now there's at least 60s between attempts, successful or not.
ensureFreshis also synchronized, since the websocket thread calls it.fix(raid): ignore chat lines containing a colon in ready detection
Guild chat like "food is ready!" counted as someone readying up, and "I would like to start a raid!" reset the tracker. Wynncraft's own ready and start lines never contain a colon; player chat always does.
fix(emote): drop duplicate click sounds on emote page buttons
Vanilla buttons already play the click sound. Add, Delete, Set Active and Randomize were playing it twice.
fix(war): keep the war board across world swaps and drop queuers that never get a timer
Testing: 288 tests pass. New tests cover the colon filter and the queuer and world-swap behaviour.
Merge order with #30: if #30 merges first, this conflicts in the world-join handler in
EdenModClient.java, since both add lines there. Keep both sides.