Skip to content

Core/Battlegrounds: Identify arena types from BattlemasterList - #32052

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

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

Conversation

@ialbahub

@ialbahub ialbahub commented Oct 8, 2026 •

Copy link
Copy Markdown

Changes proposed:

  • Use BattlemasterList data in BattlegroundMgr::IsArenaType instead of the hardcoded arena list.
  • Keep the BATTLEGROUND_AA special case and return false when the client record is missing.
  • Add a regression test showing that an arena outside the old list receives client instance ID 0, while an ordinary battleground receives ID 1.

Issues addressed:

Arena types outside the hardcoded list are treated as ordinary battlegrounds when allocating client instance IDs. No linked issue.

Tests performed:

  • Builds with Clang 18, Release and MySQL, with warnings treated as errors: worldserver, bnetserver and tests.
  • All 36 CTests pass. The regression passes 4 assertions and fails without the fix.
  • Checked arena and battleground records outside the old list, as well as BATTLEGROUND_AA.

Known issues and TODO list:

  • Verify arena queue behavior in-game. The automated test covers classification through the client instance ID allocator.

Please review the use of BattlemasterList and the all-arenas special case.

Read the BattlemasterList type instead of restricting arena classification to five map IDs. Preserve the all-arenas queue special case. Newer arena types should not be allocated client-visible battleground IDs.

Test both arena and ordinary battleground metadata through the production client ID allocator. The arena case fails before the fix.
@ialbahub ialbahub changed the title Core/Battlegrounds: Identify arena types from client metadata Core/Battlegrounds: Identify arena types from BattlemasterList Oct 8, 2026
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.

1 participant