Skip to content

fix: allow .debug bg test starts when CFBG is enabled - #173

Merged
FrancescoBorzi merged 1 commit into
masterfrom
fix-debug-bg-testing
Jul 2, 2026
Merged

fix: allow .debug bg test starts when CFBG is enabled#173
FrancescoBorzi merged 1 commit into
masterfrom
fix-debug-bg-testing

Conversation

@FrancescoBorzi

@FrancescoBorzi FrancescoBorzi commented Jul 2, 2026

Copy link
Copy Markdown

When CFBG is enabled, the core .debug bg command stops working: a GM who
toggles debug mode and queues a single character never gets an invite, because
CheckCrossFactionMatch fully replaces the core start checks and has no
handling for testing mode.

Two things go wrong there. With CFBG.EvenTeams enabled the balancing pass
drops a lone queuer outright, and even when the player survives selection the
start condition requires both teams to reach the minimum player count, so the
1v0/1v1 starts that core allows under .debug bg can never happen.

This change checks sBattlegroundMgr->isTesting() in CheckCrossFactionMatch
and, while testing is on, relaxes the balancing diff so a lone player is kept,
then accepts a single non-empty selection pool as a valid start. This mirrors
what core BattlegroundQueue::CheckNormalMatch does in testing mode. Both
changes are behind the isTesting check, so nothing changes on a live server
where .debug bg is off.

How to test:

  1. Set CFBG.Enable = 1, log in as GM, run .debug bg.
  2. Queue a single character for any BG: the invite should pop on the next
    queue update and a 1v0 match starts.
  3. Queue two characters of the same faction: a 1v1 match starts.
  4. Turn .debug bg off and verify normal matchmaking is unchanged, including
    the EvenTeams behavior.

AI Disclousure

Created with the help of Claude Code

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@FrancescoBorzi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 833b243c-508d-4f28-9d9b-b2fd6ab4e078

📥 Commits

Reviewing files that changed from the base of the PR and between 902f3af and 9432a31.

📒 Files selected for processing (1)
  • src/CFBG.cpp
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-debug-bg-testing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@FrancescoBorzi
FrancescoBorzi merged commit d9b40ca into master Jul 2, 2026
2 checks 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.

Debugging BG mode not working with the module

1 participant