Skip to content

Core/Battlegrounds: Fix all-arenas instance lookup - #32053

Draft
ialbahub wants to merge 1 commit into
TrinityCore:masterfrom
ialbahub:fix/battleground-arena-invitations
Draft

ialbahub wants to merge 1 commit into
TrinityCore:masterfrom
ialbahub:fix/battleground-arena-invitations

Conversation

@ialbahub

@ialbahub ialbahub commented Oct 8, 2026 •

Copy link
Copy Markdown

Changes proposed:

  • Fix BattlegroundMgr::GetBattleground lookups for BATTLEGROUND_AA. Arena instances are stored under their actual arena type, so looking only in the all-arenas container does not find them.
  • Search the instance containers for all-arenas requests and accept only arena instances.
  • Add a regression test for arena lookup and invited-player count cleanup through BattlegroundQueue::RemovePlayer.

Issues addressed:

Canceling an arena invitation can leave the invited-player count unchanged because the queue cannot find the arena instance. No linked issue.

Tests performed:

  • Builds with Clang 18, Debug and MySQL, with dynamic scripts, no PCH and warnings treated as errors: worldserver, bnetserver and tests.
  • All 36 CTests pass. The regression passes 9 assertions and fails without the lookup fix.
  • Tests check arena/non-arena and wrong-type lookups, then remove an invited player and verify the invited count and queue records are cleared.

Known issues and TODO list:

  • Test the invitation/cancellation flow in-game. The automated test uses an offline player and exercises the stored instance and queue methods.

Please review the all-arenas lookup, arena-only filter and invited-count cleanup.

Arena invitations refer to instances stored under individual arena map types, rather than the all-arenas queue type. Search the actual containers for that queue and reject non-arena matches.

Verify arena cancellation releases the invited slot and removes queued player/group state. The registered-instance lookup fails on upstream and all 36 dynamic MySQL CTests pass with the fix.
@aquadeus

aquadeus commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

aislop must be stopped

@ialbahub ialbahub changed the title Core/Battlegrounds: Resolve arena invitations by their actual instance Core/Battlegrounds: Fix all-arenas instance lookup Oct 8, 2026
@ialbahub

ialbahub commented Oct 8, 2026

Copy link
Copy Markdown
Author

aislop must be stopped

? I have these for my own repo, thought I would share to fix some of the issues I ran into

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants