Skip to content

feat: add .cfbg debug command for inspecting player CFBG state#152

Merged
Nyeriah merged 1 commit into
azerothcore:masterfrom
Nyeriah:feat/cfbg-debug-command
May 29, 2026
Merged

feat: add .cfbg debug command for inspecting player CFBG state#152
Nyeriah merged 1 commit into
azerothcore:masterfrom
Nyeriah:feat/cfbg-debug-command

Conversation

@Nyeriah
Copy link
Copy Markdown
Member

@Nyeriah Nyeriah commented May 29, 2026

Summary

  • Adds .cfbg debug [$playername], a console-accessible command (GM 1+) that dumps a player's CFBG state.
  • Defaults to target/self in-game; console requires a player name.
  • Output: enable flags (system/WG), Faked/PlayingNative/ForgetBGPlayers/ForgetInListPlayers, class/gender, native vs current race+team+display IDs, the SETTING_CFBG_RACE preference, and the stored FakePlayer record (fake + real race/morph/team) when the player is currently faked.
  • Promotes CFBG::GetFakePlayer from private to public so the command can read the fake record.
  • Registers cfbg debug in cfbg_commands.sql (security 1, help text), and includes it in the matching DELETE for idempotency.

Test plan

  • Build with the module enabled.
  • Apply cfbg_commands.sql against acore_world.
  • In-game as GM ≥ 1: .cfbg debug (self), .cfbg debug with another player targeted, .cfbg debug PlayerName.
  • From console: cfbg debug PlayerName (online) and confirm offline name returns Player not found.
  • Verify the Fake record block appears only while inside a BG / WG war (i.e. while the player is in _fakePlayerStore).
  • Confirm SEC_PLAYER cannot invoke .cfbg debug.

🤖 Generated with Claude Code

Console-accessible, gated to GM 1+ (SEC_MODERATOR). Defaults to
target/self in-game; console requires a player name. Dumps enable
flags, fake/native/forget flags, native vs current race/team/display,
the preferred race setting, and the stored FakePlayer record when faked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nyeriah Nyeriah merged commit dd65716 into azerothcore:master May 29, 2026
1 check 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.

1 participant