Skip to content

Update BattleOrders.js#418

Open
Antiwarden wants to merge 13 commits into
blizzhackers:restructurefrom
Antiwarden:patch-1
Open

Update BattleOrders.js#418
Antiwarden wants to merge 13 commits into
blizzhackers:restructurefrom
Antiwarden:patch-1

Conversation

@Antiwarden
Copy link
Copy Markdown
Contributor

Adjusts the giveBo() function in BattleOrders.js to ensure that the script waits only for players who are explicitly defined as getters in the configuration, regardless of any additional players present.

Antiwarden and others added 4 commits October 12, 2024 08:43
Adjusts the giveBo() function in BattleOrders.js to ensure that the script waits only for players who are explicitly defined as getters in the configuration, regardless of any additional players present.
@Antiwarden
Copy link
Copy Markdown
Contributor Author

Antiwarden commented Dec 22, 2024

Might be helpful to track the actual boGetters in the game. If one is missing, they could be temporarily removed from the getters list to speed things up.

If some of our getters are missing in game, remove them from the boGetters list and proceed.
Last change dropped all getters from the list who were not present at the bo spot. Now, it removes only those from the list who are not in the game.
Fixes an issue where the boGiver would continue to wait even after successfully casting bo on a late-arriving getter after the wait timer had expired.

- remove getters from the list after they receive bo
- giveBO() function returns immediately once all getters have received bo
- stop the main loop once all getters have received bo
- Renamed `removeMissing()` to `getGetters()`
- `getGiver()`: Additional function for boGetters to determine whether the boGiver is in-game and in the same party.  
  If the giver is not in-game and not in our party after a certain time, BattleOrders.js is terminated.  
  - `@param {string} Config.BattleOrders.Giver` and  
  - `@param {int} Config.BattleOrders.WaitForGiver` are required in the character configuration.
- `getGetters()`: Filter not only boGetters that are in-game, but additionally boGetters that still need to be buffed.
- `giveBo()`: Additionally filter `playersToBo` to exclude boGetters that have already been BOed.
- `failTimer`: Reduced timeout for boGetters and boGiver to appear from 2 minutes to 40 seconds.
- `chatEvent()`: Bitwise `|` → logical OR `||`
Removed 'gaveBo' property from BattleOrders.js since it's not needed anymore.
- added role-specific wait timers in `tardy()` function for `Config.BattleOrders.Wait` me.overhead messages
- removed redundant return for `boed` flag and `playersToBo` count
- throw an error if `boGiver` hasn't specified any `boGetters`
- added guard for `boMode.Give` case to exit the `MainLoop` if `boGetters` is empty
- formatting
Add guard in `boMode.Give` case to exit the MainLoop if `boGetters` is empty.
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.

2 participants