fix: team sizing during the port window reads the invited ledger - #175
Conversation
The corrector compared live head counts, which exclude every invitee still porting: accept deletes the queue-side GroupQueueInfo without decrementing the BG's invited count, so a porting premade is invisible to GetPlayersCountByTeam. A solo entering before the premade landed got flipped onto the premade's side, starting the match 1v3. Compare the invited ledger (entered + accepted-in-flight + pending) instead, minus the entrant's own still-ledgered reservation, and update the conf.dist description accordingly. Fixes #172
A player between accept and worldport ack is in neither term of the projection: the accept deleted their GroupQueueInfo and AddPlayer has not run yet. Reinforcement during that window saw the side as short and over-invited onto it, producing 3v2 (or 6v5) starts under strict EvenTeams. Clamp each team's projection up to the BG's invited ledger, which keeps tracking porting players until RemovePlayerAtLeave or invite expiry. Note: a separate core defect can leak the invited count by +1 when an accepted port never lands on the BG map (fix proposed upstream in azerothcore/azerothcore-wotlk). Under max() a stale +1 converts to under-reinforcement of that side for the instance's lifetime, which fails safe and resets at BG end.
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Fixes #172
Team-sizing decisions made while accepted players are still on the loading screen could not see them, so a solo got flipped onto a porting premade's side (1v3) and reinforcement over-invited during the port window (3v2 under strict EvenTeams). Both
BalanceTeamsOnEntryandGetProjectedBaseCountsnow read the BG's invited ledger, which tracks exactly that population; rollback viaCFBG.BalanceTeamsOnEntry.Enabled = 0for the first fix, single-commit revert for the second.AI tooling (Claude Code) was used to investigate and prepare the change.