Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the LOOT_READY session lockout with a bucketed event handler #620

Merged
merged 3 commits into from
Aug 21, 2023

Commits on Aug 20, 2023

  1. Refactor: Moved LOOT_READY handling to a separate function

    This is required to handle bucketed events, as we can't differentiate in the callback handler to RegisterBucketEvent.
    
    The do-end block is temporary, just to avoid an incomprehensible diff due to indentation changes.
    rdw-software committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    2c06d82 View commit details
    Browse the repository at this point in the history
  2. Core: Streamlined LOOT_READY handling via bucketed events

    While still somewhat questionable due to being based on a fixed timing (0.5sec), it appears to handle the sequence of LOOT_READY -> LOOT_OPENED -> LOOT_READY much better than manually managing the "session lock". That means we can delete the locking mechanism (yay) and still prevent duplicate attempts from being counted.
    rdw-software committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    5b320c9 View commit details
    Browse the repository at this point in the history
  3. Cleanup: Removed the obsolete session locking mechanism

    This was clearly an ill-conceived feature from the start (due to lack of experience on my part), only necessitated by the second LOOT_READY that Blizzard seemingly introduced after the loot window is opened.
    
    Thanks to the bucketed sequence we can completely purge it and it still works, at least as long as events trigger within the same 0.5sec burst delay. Of course, this doesn't fix attempts being lost if players are looting too fast, but if that turns out to be a problem it's trivial to adjust the delay (or even make it configurable).
    rdw-software committed Aug 20, 2023
    Configuration menu
    Copy the full SHA
    4b8e907 View commit details
    Browse the repository at this point in the history